Rubyists: if blah.nil? is bad. Also if !blah should be unless blah.
This is like fingernails on a chalkboard to me.
#GetOffMyLawn
-
-
-
Replying to @peidran
it isn't idiomatic. Both those cases have unnecessary method calls which reduces readability and maybe performance.
2 replies 0 retweets 0 likes -
Replying to @the_thagomizer
what’s the most readable way to find out something is nil?
2 replies 0 retweets 0 likes -
Replying to @peidran
unless blah assuming that false is an okay value too.
1 reply 0 retweets 0 likes -
Replying to @the_thagomizer
I think spending a little time in Hindley-Milner land means conflating nil and false gives me that chalkboard feeling
2 replies 0 retweets 1 like
but I get that testing for presence/absence may be the most common thing in OOP, and legitimate
4:51 PM - 10 Jun 2016
from Fremont, Seattle
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.