Hacker News new | ask | show | jobs
by throwawaymaths 1159 days ago
Elixir is incredibly consistent with how it uses nil. It does take a bit of work -- you have to really pay attention to the convention of fetch! vs fetch vs get -- and often times library maintainers are not... always the best at that... but for all the problems that dynamic languages has, nil in elixir is pretty low on the list. I think I get bitten by maybe one a year, and it causes the sporadic report on sentry, and then I go and fix it, and that's that.

That access acts on nil is unfortunate, but it's necessary for things like get_in.

1 comments

> That access acts on nil is unfortunate, but it's necessary for things like get_in.

Ah, that explains it at least. Other atoms don't implement the access behavior.