The issue:

ipm =: 3 : 0

ip =: 2 (0}) ip

)

   ip =: i. 3

   (ipm '') ] ip

2 1 2


As you see, ip was modified by call to ipm, which did an in-place assignment. This violates the rules, which say that the value of ip should have been stacked. In fact, a pointer to the value is stacked.


This requires a decision. I think we need a committee of J Language Experts to decide how to resolve issues like this, and future enhancements.


The choices as I see them are:

1 - Fix to conform to the Dictionary. Possible; would slow things down a little; would make some assignments currently done in-place perform a copy.


2 - Ignore it.  Leave as is.


3 - Embrace it - declare that in-place assignments to global variables may affect previously-stacked references to the same name. [With local variables the problem does not arise]

Now we need a Language Committee, and a decision.


Henry







----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to