Re:Using “and” and “or” in Ruby
by _delirium on Monday August 02, 2010 @07:22PM
(#1569485)
Maybe I'm not good at the context-switching between parsing things as operators versus as English, but I find them confusing in Perl except in some very simple idiomatic cases, where they're fine because I read them as boilerplate. The common do_thing or die "error" idiom is perfectly readable, but anything more complex and I start explicitly reasoning about short-circuit semantics.
It's possible I have that reaction due to the strong negative consensus about using short-circuiting as control flow in C being hammered into my head at an early age, though.
It's possible I have that reaction due to the strong negative consensus about using short-circuiting as control flow in C being hammered into my head at an early age, though.