Randy wrote:
> The workings of qdoj was obvious enough.
> How one arrives at the left argument is
> not so clear.
Agreed; this is one of the interface limitations I mentioned earlier. I have a
project in the works to improve this.
> I do fail to see a rationale for restricting the
> domain of should-be-niladic foreigns.
Well, Raul suggested a plausible one (*):
> To provide room for potential future enhancements.
Others:
(A) Niladic functions have no domain; arguably, asserting on arguments
other than '' makes this clear (alternately, given J's
grammar, '' is the the closest one can come to expressing an
argument in the domain of 6!:0 ).
(B) Why not?
To (B): do you have a reason for passing non-'' arguments to 6!:0 ? I can
think of one: because you have a sentence like this:
'Read file at: ', ":6!:0 data=.1!:1<'filename'
That is, your sentence has side effects, and the "last operation" you want to
perform in that sentence is querying the time, without having to break the
sentence out into different lines. Fair enough. OTOH, it is quite simple to
provide 6!:0 with an acceptable argument, and yet only lengthen any sentence
by 3 characters (max):
'Read file at: ', ":6!:0''[data=.1!:1<'filename'
("any sentence" is not quite accurate, but it's true that this modification
would fix any sentence broken by the restriction)
But why speculate when we can inquire? Hey Roger, what is the rationale for
restricting the domain of should-be-niladic functions?
> [The only out-joke I can think of offhand is George Michael.]
http://en.wikipedia.org/wiki/Trapped_in_the_Closet_(South_Park)
-Dan
(*) http://www.jsoftware.com/pipermail/programming/2007-October/008487.html
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm