As an aside: in Ruby where if is an expression not a statement you can write something very close without all the extraneous squiggles.
number = if logical_test value else 0 end
Not to mention case is also an expression and can be used similarly.
zerg = case foo when "bar" Hydralisk.new when "baz" more_creep() else raise "Too few Starcraft references" end
--
We're looking for people in ATL
In reply to Re^4: Ternary operators: a hinderance, not a help
by Fletch
in thread Ternary operators: a hinderance, not a help
by Tanalis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |