Wed Apr 28 12:16:54 CEST 2004
> -----Original Message-----
> From: owner-erlang-questions@REDACTED
> [mailto:owner-erlang-questions@REDACTED]On Behalf Of Dustin Sallings
> Sent: den 28 april 2004 10:49
> 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.
Imo it is not at all surpricing that you get this feeling, especially since processes in fact are objects in one sense. Objects that has a thread of execution within them, so sending messages between two processes could be viewed as one object using the other.
A difference though is that OO in itself do not cover execution, as the erlang model does (with its processes). In many OO languages/systems one needs to handle semafors and critical sections, wheras in erlang one only needs to concern about processes.
And now I want to take the opportunety to thank those who created the concurrency part of erlang: I just *love* the concurrency solution -- the best I've seen so far!
More information about the erlang-questions