2 ms·
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 ge
by throwawaymaths 4y 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.
- vlunkr 4y ago> 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.