On 9/5/2020 3:48 PM, Mike Cowlishaw wrote:
Rony, this was added to NetRexx back in the 1990s.�� ooRexx does it
differently, for whatever reason.�� Whatever the case, it is always
better to 'spell out' the short-circuits in the code rather than rely
on weird notations, surely?�� That way, people who read the code later
can see exactly what the programmer intended, rather than having to
infer it from�some piece of code and notation that quite possibly was
wrongly coded in the first place.� Very few C coders understand the
difference between '&' and '&&', for example. They randomly use both
until the compiler complains.
In short: if the programmer wanted to 'save time' with a short-circuit
then it would be better if they learned to make their code simpler and
more readable.� If they wanted to do a second test only if the first
succeeded, they can always write that explicitly.� And anyone who
later reads that code will thank them for it.
And Rexx already provides an easy and clear way to do multiple tests,
one after the other, without deeply nesting If statements - the Select
When statement. Each When test is done consecutively until one returns
true. By appropriate choice of logic and good, meaningful comments, this
can provide the short-circuit test in a concise, easy to read manner.
That's why Rexx was designed to be (and hopefully still is): a
language that is understandable -- and, more importunately, usable
--�to most people.
Mike
--
Gil Barmwater
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel