I am working on emancipating the in-place operations so that they can be performed inside sentences, not just in the special forms. Thus, in

a =. ({."1 b) , c

the , would be performed in-place. In-place operations will be recognized whenever the arguments are results (rather than names or constants). As another example, something like

a =. b + , >: c

will perform the , in place.

In-place operations will also be recognized when one argument is being reassigned:

a =: a , blah   NB. This has always been handled in place

a =. b =: b , blah   NB. This would not have been in place


Here's the catch: in-place assignments will be recognized ONLY FOR LINES EXECUTED IN EXPLICIT DEFINITIONS. If you type those in from the keyboard, you will get new blocks allocated.

This makes the implementation easier, and I reasoned that lines from the console are not performance-critical anyway.

But now I'm thinking I should ask, in case this would cause trouble for people with applications like mapped files. If you really need append-in-place from the console you will have to use something like

apip =. 4 : '3 : (x , ''=:'' , x , '', y'') y'

and type

'name' apip value

Anybody got a problem with that?

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

Reply via email to