Y
Hacker News
new
|
ask
|
show
|
jobs
by
graywh
4930 days ago
That's a good example
shirt.blue? and return bar
would be equivalent to
return bar if shirt.blue?
You can do the same with
or
and
unless
.
1 comments
philwelch
4930 days ago
I find the postfix if and unless far more readable than the Perlish and and or operators. The "or die" construction for asserts is really amusing though.
link