Closed zaboco closed 8 years ago
I vastly prefer simplicity here, and making this configurable would add complexity (especially for the readers, who would have to check the config every time they see ~m
because they don't know whether you're using atom or string keys). Also, I disagree that the most common use case is for maps to have atom keys: just think of the params passed to Phoenix controllers.
Thanks a lot anyways! :heart_decoration:
Yes, I can see your point on simplicity, I totally agree. After all, it's not that hard to add an 'a' at the end. Thanks.
I know that the default modifier is
?s
for consistency with~w
sigil. However, for maps the most common use-case is to have atoms as keys.So, I think that this option could be extracted in
config.exs
and be accessible asApplication.get_env(:short_maps, :default_modifier)
.What do you think? If that's ok, I can do it myself and send a PR.