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,

-- 
Raul

On Mon, Nov 6, 2017 at 1:46 PM, Don Guinn <dongu...@gmail.com> wrote:
> Just curious. How much code would it take to determine that the left
> argument need not be computed? If the probability is that the right
> argument would be zero is very low, then the test would be wasting more
> time than it saved for the improbable case. It makes sense to skip the left
> argument evaluation if this evaluation were very complicated and took a lot
> of time. But a good programmer would be aware of this case and would not
> depend on the interpreter/compiler to take care of it for him.
>
> On Mon, Nov 6, 2017 at 11:19 AM, Raul Miller <rauldmil...@gmail.com> wrote:
>
>> ^: is J's short circuit operator.
>>
>> we do not need to overload verbs for this. (Though I understand peer
>> pressure makes us want to incorporate features of other programming
>> languages which would cripple J.)
>>
>> Thanks,
>>
>> --
>> Raul
>>
>>
>> On Mon, Nov 6, 2017 at 12:41 PM, Moon S <moon.aka....@gmail.com> wrote:
>> > It could be great to have and.  and or. in if. and while. conditions,
>> like
>> > if. a~:0 and. b<x%a do. ... NB. or right to left? also a question
>> > but I understand the rules for their combination would be difficult
>> > and out of the language discipline.
>> > A pity anyway.
>> >
>> > On Mon, Nov 6, 2017 at 6:42 PM, 'Mike Day' via Programming
>> > <programm...@jsoftware.com> wrote:
>> >> ...not forgetting that *.  is least common multiple for integer
>> arguments.
>> >>
>> >> eg
>> >>
>> >>    12 *. 16
>> >> 48
>> >>
>> >> Mike
>> >>
>> >> Please reply to mike_liz....@tiscali.co.uk.
>> >> Sent from my iPad
>> >>
>> >>> On 6 Nov 2017, at 11:35, Rudolf Sykora <rudolf.syk...@gmail.com>
>> wrote:
>> >>>
>> >>>> On 6 November 2017 at 12:21, Linda Alvord <lindaalvor...@outlook.com>
>> wrote:
>> >>>> Wasn't sure so I guess the answer is it gets evaluated:
>> >>>
>> >>>
>> >>> Well, sometimes it doesn't:
>> >>>
>> >>> (>:a) *. (0<a=.1)
>> >>> 2
>> >>> (>:a) *. (0<a=.0)
>> >>> 0
>> >>> (>:a) *. (0<a=._5)
>> >>> 0
>> >>>
>> >>> Ruda
>> >>> ----------------------------------------------------------------------
>> >>> For information about J forums see http://www.jsoftware.com/forums.htm
>> >> ----------------------------------------------------------------------
>> >> For information about J forums see http://www.jsoftware.com/forums.htm
>> > ----------------------------------------------------------------------
>> > For information about J forums see http://www.jsoftware.com/forums.htm
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to