Using ^: is a clever idea.  But it makes heavy work of a simple and useful case.  If I want the equivalent of

if. cheapverb y and. expensiveverb y do.
end.

I have these options:

if. cheapverb y do. if. expensiveverb y do.
end. end.

if. cheapverb y do. expensiveverb y else. 0 end. do.
end.

if. (expensiveverb@[^:] cheapverb) y do.
end.


I think it makes a pretty good case for and. .

Henry Rich

On 11/6/2017 1:55 PM, Raul Miller wrote:
Probability is extremely low, since the parser does not hand control
to the verb until after both nouns have been computed. You can even
write code which abuses this (though that tends to be hard to
understand so few people like that sort of thing - but trying to
forbid foolish code at the language level tend to cripple things.)

^: on the other hand, puts control of this in the hands of the
programmer (its argument is two verbs and the right verb can control
whether he left verb does anything).

Thanks,



---
This email has been checked for viruses by AVG.
http://www.avg.com

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to