You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today, Elixir has Keywords lists and a Keyword module that behaves as a Dict, but it is not really a Dict since it can contain duplicated entries and the keys are limited to be atoms.
Even though, should Keywords be part of the Dict protocol? My feeling right now is no since I still haven't written any code where one would accept both keywords or dictionaries as argument. They seem to have distinct use cases. For example, keywords are usually written by the developer. Dicts instead are used when parsing external data or storing internal information in a more efficient way.
I don't expect a conclusion to this discussion now, but at least we can leave it documented.
The text was updated successfully, but these errors were encountered:
Today, Elixir has Keywords lists and a Keyword module that behaves as a Dict, but it is not really a Dict since it can contain duplicated entries and the keys are limited to be atoms.
Even though, should Keywords be part of the Dict protocol? My feeling right now is no since I still haven't written any code where one would accept both keywords or dictionaries as argument. They seem to have distinct use cases. For example, keywords are usually written by the developer. Dicts instead are used when parsing external data or storing internal information in a more efficient way.
I don't expect a conclusion to this discussion now, but at least we can leave it documented.
The text was updated successfully, but these errors were encountered: