Blog Post: 10 Elixir gotchas

I had been thinking about this as well. nil, true and false being atoms is up for the next edition. I think it’s tougher, I can see non_nil but the booleans being in the mix is also somewhat confusing.

Since atoms should be known at compile time I think you’re usually better off making an explicit check against a list of known atoms though aka in [:a, :b, :c]

3 Likes