guidance
Dustin Sallings
dustin@REDACTED
Wed Apr 28 10:48:30 CEST 2004
On Apr 28, 2004, at 0:50, Vance Shipley wrote:
> 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.
I'm not using the process dictionary (I haven't found any reason I'd
want to yet). I have a getdict and getval are functions inside my
module that send messages to my process and receive a response. My
concern is that I'm trying to do FP but it feels like OO with all the
message sending and stuff.
I'm not complaining, it is just a bit surprising.
> 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.
I'm not coming from a C background...well, not exactly, anyway. When
I learn a new language, I try to learn the way of the new language.
The erlang way is starting to feel a little like OO and I'm trying to
figure out if that's because I do too much OO or it's a secret that you
don't tell people when they're learning erlang.
--
SPY My girlfriend asked me which one I like better.
pub 1024/3CAE01D5 1994/11/03 Dustin Sallings <dustin@REDACTED>
| Key fingerprint = 87 02 57 08 02 D0 DA D6 C8 0F 3E 65 51 98 D8 BE
L_______________________ I hope the answer won't upset her. ____________
More information about the erlang-questions
mailing list