Elixir Maps With String/Colon Keys Are Atoms
While running the Elixir 1.6 formatter against Today I Learned, this change caught my eye. The formatter changes maps like this:
%{ "short_name": "TIL" }
To this:
%{ short_name: "TIL" }
This change makes sense because "short_name":
is just another way to use short_name
as an atom key:
iex> %{"key": "value"}
%{key: "value"}
Elixir 1.6's formatter requires this more explicit syntax.
Tweet