I really wish I could call object.false? in Ruby. It would eliminate a lot of confusing cases for “unless” usage.
-
-
Replying to @olivierlacan
I prefer to avoid object == false since it’s a lot less clear & elegant in my book. Object#nil? exists. Object#falsey? and
#truthy? don’t.1 reply 0 retweets 0 likes -
Replying to @olivierlacan
Illustration of my yearning for falsey checks in Ruby. Hidden double negative in `unless object` when object is falsey causes confusion.pic.twitter.com/eefWDF2Y3G
1 reply 0 retweets 0 likes
Replying to @olivierlacan
`add_error if !action` reads pretty nicely compared to those as well
3:09 PM - 12 Dec 2016
from Ottawa - Gatineau
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.