Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
lolc
3y ago
0 comments
Share
While it may not matter in many circumstances, this is not the same as "if foo", because false is not nil.
0 comments
default
newest
oldest
sodapopcan
3y ago
It's true but in 10+ years of writing Ruby it hasn't mattered in _any_ circumstances I've come across. I also assert that having a boolean where `nil` is meaningfully different than `false` is a smell and should be avoided.
j
/
k
navigate · click thread line to collapse