[erlang-questions] Process Dictionary vs Proplist in Web Frameworks

James Hague <>
Wed Oct 28 17:21:46 CET 2009


> Even such stateful languages like Ruby use explicit passing of all
> request information in hash table. There is absolutely no use in
> using some mutable dictionaries.

If the data remains constant once the request is parsed, then pass it
around as a dictionary / gb_tree / etc. (or even just a list of {Key,
Value} tuples, which has the fastest look-up time for shortish lists
if you use lists:keyfind).

Now in the case where you need to be making random reads AND WRITES to
data like this, across a number of functions, then I can totally
understand using the process dictionary. When I run into situations
like that I wish I could just write a particular module in Python and
be done with it.


More information about the erlang-questions mailing list