isaacg1 / pyth

Pyth, an extremely concise language. Try it here:
https://pyth.herokuapp.com/
MIT License
263 stars 57 forks source link

The documentation does not specify the difference between J and K #222

Closed Jim-Bar closed 7 years ago

Jim-Bar commented 7 years ago

The behaviors of J and K are slightly different. J is assigned with copy while K is assigned directly. The documentation in rev-doc.txt does not specify this difference: J <any> Variable, Autoinitializing. J=A on first use. K <any> Variable, Autoinitializing. K=A on first use.

isaacg1 commented 7 years ago

J and K at one point had different behaviors, but do not any longer. The docs reflect this fact. You can see that they are identical by looking at the compiled Python code:

==================== 4 chars =====================
K4J4
==================================================
assign("K",4)
assign("J",4)
==================================================