News for hackers. Stuff that matters.
Re:DRY is an over-rated programming principle? by sodapopcan on Thursday July 07, 2022 @03:13PM (#32018049)
I've seen this in Ruby and Elixir that drives me a little nuts:

  if !is_nil(foo)
Re:DRY is an over-rated programming principle? by lolc on Thursday July 07, 2022 @06:24PM (#32020358)
While it may not matter in many circumstances, this is not the same as "if foo", because false is not nil.
Re:DRY is an over-rated programming principle? by sodapopcan on Wednesday July 13, 2022 @10:21AM (#32083144)
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.