Raul Miller wrote:
RM> The dictionary says that u/y inserts u between the items of y. For the
RM> case where 1=#y there is only one item of y and so there is no place
RM> to insert u, so u is inserted nowhere. That, to me, is common sense,
I guess nobody here in this thread has any problems to find/accept
this possible interpretation of the DoJ's silence on the 1=#y case.
We differ whether this interpretation is really the only one possible.
RM> and the implementation of J seems to back me up on this issue.
It backs all of us up what could be made more explicit. That is all Boyko
is asking for, and I agree with him that it should be.
Note: it would be a mere 1-line change to ar.c to make u/ respond with
DOMAIN ERROR in the 1=#y case.
Would that still be a DoJ conforming implemetation?
I'd say yes.
Would that be a useful implementation?
Depending on the phase of the moon, I could turn silly and argue
(1) Those who *ask* for function insertion should *get*
that, and be alerted if the data doesn't really allow that.
(Whoa, there is that special 0=#y rule, funny, but then
we will conform and implement THAT special case.)
(2) +/'abc' nicely alerts me of the domain error.
+/'a' shall not proceed undedected, either,
as it would do in "the other stupid system".
A simple line as suggested by Boyko is required to force all implementations
to stick with the familiar behaviour and prevent them from doing their own
thing in the 1=#y case.
Martin
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm