The modifier might contain loops, references to globals (whose values are valid only instanter), calls to verbs... How would you decide when the text is to be interpreted, and when its interpretation is to be deferred till the time the verb operands are provided?
The current rule is: if no x/y, the text is interpreted immediately. That seems like a reasonable rule to me. The issue to focus on is, When should the text of the modifier be interpreted? For most modifiers, the answer is that it must be interpreted when the modifier gets its u/v, since there may be no x/y coming. If you can come up with a better rule, that would be a boon for J. The ':' in explicit definitions is syntactically different from the : conjunction so the definition of the : conjunction does not apply in the case we are discussing. In definitions, ':' in a delimiter, not a conjunction. Henry Rich > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Dan Bron > Sent: Friday, November 23, 2007 1:22 AM > To: 'General forum' > Subject: RE: re[Jgeneral] duce/fold in J as an adverb or conjuction > > Henry wrote: > > Not a bug: when x/y are absent the body of the modifier > > (which may be long) is executed as soon as it has its verb > arguments. > > I'll think more about your response, but my knee-jerk > reaction is: your facts are correct, but your conclusion not. > > Yes, it must be parsed immediately. But why does that prevent > > + 1 : 0 > u~/@|.@([EMAIL PROTECTED]@]`0:`]}~) > : > u~/@|.@((u {.)`0:`]}) > ) > > from returning > > +~/@|.@([EMAIL PROTECTED]@]`0:`]}~) :(+~/@|.@((+ {.)`0:`]})) > > immediately? > > The nameclasses of all of the primitives in the explicit > adverb are known. That includes u . > > Given that, Section E fully specifies what the result of each > sentence will be. The definition of : specifies that the first > sentence defines the monad, and the second the dyad. But the > second sentence is dropped; the dyadic definition ignored. > > That is a bug. > > This thread started a train of thought in me. I was > originally going to post it to the Forum, but it became too > long winded (and > probably irrelevant to most subscribers). I pasted the email > up on the Wiki: > > > http://www.jsoftware.com/jwiki/DanBron/Temp/Parser_Bugs_and_Pr > oposed_Resolution > > The ideas haven't gelled, and the page isn't wikified yet, > but I solicit input on the ideas presented anyway. > > -Dan > > ---------------------------------------------------------------------- > For information about J forums see > http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
