Raul Miller wrote:
>> How does it follow from nowhere-inserting u that u/y returns y as
>> it is? How does it follow that it returns anything to do with y?
>
>In the general case, it does not return y as it is. Instead, it
>returns the only item in y.
>
>Only when y is rank 0 can u/y return y as it is.
Surprise, surprise... this figures with the j6 behaviour:
$ ,/ 'a'
$ ,/ ,'a'
but not with earlier versions (I checked out J Release 4 + 5
as well as J *Version* 7):
$ ,/ 'a'
$ ,/ ,'a'
1
The DoJ "Insert" entry is identical for both versions,
lacking a prescription for the 1=#y case.
Looks to me like JSoftware prefers to treat this area as
"unspecified behaviour" indeed, changeable at their whims.
Maybe J Release 9 will return a constant 42 on Sundays and
raise a DOMAIN ERROR otherwise -- who can say for sure?
I do not want to get misunderstood that a computer language
reference should avoid "unspecified behaviours" -- they allow
implementors to select convenient or efficient implementations.
Programmers just need to be aware of these undefined areas,
make *not* invalid assumptions. It appears that we occasionally
don't manage, as in this case.
Martin
PS: Bonus points for locating this change in behaviour in
http://jsoftware.com/help/release/contents.htm - I couldn't.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm