The moral is: don't use these very-low precedence operators unless you
That's the second time today I notice that you are required to use
parentheses in Ruby (cf. m(arg){block}). Would that be a Lots of
Insipid and Stupid Parentheses language?
Only if you had to use them all the time, and put them in the wrong
place
In anycase, I've got too small a brain to remember such rules, I put
parentheses everywhere.
That's always the safe bet.
You could argue that Ruby would have been a better language if 'and',
'or' and 'not' were removed completely. I wouldn't disagree, but it's
easy to avoid them when you know.
BTW, Perl has exactly the same problem too. Some of the following work,
and some don't. But because Perl doesn't make such wide use of
exceptions, this is a common idiom:
open FILE, "/etc/mot" or die "No such file";
open FILE, "/etc/mot" or die("No such file");
open FILE, "/etc/mot" || die "No such file";
open FILE, "/etc/mot" || die("No such file");
open(FILE, "/etc/mot") or die "No such file";
open(FILE, "/etc/mot") or die("No such file");
open(FILE, "/etc/mot") || die "No such file";
open(FILE, "/etc/mot") || die("No such file");