Hacker News new | past | comments | ask | show | jobs | submit login

Yes the process dictionary seems attractive, but you will come to regret it. It will always bit you in the bum, don't do it, don't do it, don't do it.



Can you explain why please?


It has global state. In erlang processes are long lived and you bring functions to them to do stuff. Suddenly you will do something and a piece of state that you weren't expecting will be in your process dictionary...

Some erlang processes run for literally years - and exist over multiple releases of the software. Reasoning about how something did or did not get into the process dictionary is for the birds.


background on PD (tho i havent kept up with developments in R14, i can't say whether everything below still valid

http://groups.google.com/group/erlang-programming/browse_frm...

------------

(Oct 09) http://groups.google.com/group/erlang-programming/browse_frm...


Hey, great links. Thanks!!


I think the consensus in 2009 was you should see how far you can get with ETS (and this will motivate me to read the R14 release notes), PD's are kind of like lisp reader macro's, very sharp and very slippery. There are many threads in the google group if you want more argumentage.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: