guidance

Vance Shipley vances@REDACTED
Wed Apr 28 09:50:59 CEST 2004


If you're new to Erlang and you're using the process dictionary 
you're probably doing the wrong thing.  I have never used the
process dictionary and I've been writing Erlang for seven years.
The closest I've come to using it is recently in dealing with shell 
sessions.  The command history uses the process dictionary.  With
the shell you need to have some persistence.  In all other cases
you pass accumulated state around in function arguments.

One of the first things you miss when coming from a C background 
and start coding in Erlang is globals.  The process dictionary 
seems to be the answer however it's existence is a compromise. It
is not the Erlang way.  

	-Vance

On Wed, Apr 28, 2004 at 08:27:57AM +0200, Matthias Lang wrote:
}  
}  At a guess, it's the access functions 'getdict' and 'getval' which are
}  worrying you. Accessing data through functions is a part of OO and
}  it's a part of other schools of thought too.
}  
}  Matthias



More information about the erlang-questions mailing list