October 2014
Intermediate to advanced
280 pages
7h 20m
English
Ask yourself these questions (in this order):
Will I want more than one entry with the same key?
If so, you’ll have to use the Keyword module.
Do I need to guarantee the elements are ordered?
If so, again, use the Keyword module.
Do I want to pattern-match against the contents (for example, matching a dictionary that has a key of :name somewhere in it)?
If so, use a map.
Will I be storing more than a few hundred entries in it?
If so, use a HashDict. With R17 of the BEAM virtual machine (which runs Erlang), maps are slow, particularly when adding new items.[13] This should improve in R18.
Read now
Unlock full access