"Dan Bron" <[EMAIL PROTECTED]> wrote:
> 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?
Adverbs and conjunctions can produce two kinds of results,
depending on how they are invoked:
1) If names from m/n/u/v and x/y are both used,
the result is an explicit verb of the form:
1 : 0
monadic sentence involving u,m,y
:
dyadic sentence involving u,m,x,y
)
2) If names from m/n/u/v are used, but x/y are not used, the result is
a tacit verb (or may also return a noun, adverb, or conjunction) of the form:
1 : 0
tacit ambivalent verb involving u,m
:
anything after the colon (if any) is ignored
)
3) If no names from m/n/u/v are used, the results are as in 2,
except x/y are treated as u/v.
If you want separate tacit monadic and dyadic verbs, write
1 : '(tacit monadic verb involving u,m) : (tacit dyadic verb involving u,m)'
> 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.
No, it is not, since the syntax model in 2 above does not produce
separate monadic and dyadic verb bodies (as 1 does, and 3 : 0 does),
but rather returns a tacit, ambivalent verb.
To be fair, however, I often fall into exactly the opposite pitfall:
I define an operator that returns an explicit dyadic verb, but do not
use the : and wonder why it always produces a domain error, when in
fact it is operating correctly - as a monadic-only verb.
-- Mark D. Niemiec <[EMAIL PROTECTED]>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm