in reply to Re: not 'another victim of precedence' ? 'It is true' : 'the code is false'
in thread not 'another victim of precedence' ? 'It is true' : 'the code is false'
anytime a logical operator has both a symbol form, and a word form, the word form is always designed to be very very low precedence
Indeed. I like to think of the spelled-out logical ops as almost being a special class of control-flow operators, useful for things like this:
dosomething with some . very(comple)x expression or warn "Some Error Message";The spelled-out logical ops are more verbose (in terms of the number of characters) than the punctuative ones, and they connect more verbose things -- whole expressions. If you need to perform a logical operation on a single term, then you either want to use the punctuative logical ops, or parenthesize. (I tend to do the latter, because I like the way (foo and bar) reads better than foo && bar, but I'm pretty sure that's a personal idiosyncracy I have, and the other way should work just as well.)
|
|---|