why does the process dictionary have a bad rep?
Fri Jul 15 12:14:04 CEST 2005
Den 2005-07-15 11:09:36 skrev Matthias Lang <>:
> Valentin Micic writes:
> [about the process dictionary]
> > has to reply with message. What are the limitations of dictionary,
> and *why*
> > it received a bad reputation?
> In addition to the points already made, another reason is that a
> significant proportion of those who haven't seen single-assignment
> before will seize upon anything which "finally lets me assign to a
> damn variable like I want to", and the first 'anything' they usually
> encounter is the process dictionary.
> (ab)using processes and message passing to achieve the same effect at
> least has the side effect of teaching them about message passing.
Agreed. The problem isn't that we shouldn't caution about use
of the process dictionary. We should do so in a way that people
get a chance to learn why it should be used with care, and what
else should be used with care.
I have yet to find the chapter that explains this.
Erlang has a pragmatic approach to message passing (no monads,
etc.) This is wonderful in many ways, but it also introduces
some juicy opportunities to write terrible code.
More information about the erlang-questions