Meyer, OO and concurrency

Vance Shipley vances@REDACTED
Thu Jul 14 03:24:21 CEST 2005


On Thu, Jul 14, 2005 at 02:02:07AM +0200, Ulf Wiger wrote:
}  
}  I've argued before that I think process dictionaries have received
}  a bad reputation unjustly. They have the same basic semantics as
}  private ets tables, but have some nice advantages besides the obvious
}  advantage of convenience.

Sure, it's just an optimization.  We could use erlang servers 
instead of ets as well but ets uses bifs and performs better
in most cases. 

I used the process dictionary when I wrote my first application.
It would be interesting to see what that looked like now but it's 
been lost to protect the ignorant.  The answer to global variables
seemed to be to use the process dictionary so that's what we did.

The light came on soon afterwards and I haven't used it again.  Nor
have I used "private ets tables".  At times I probably should have 
as the error reports can be unwieldy when you have too much state
data.  But this is not to say that there is no place for the process
dictionary or ets.  It's just that in most cases folks will use them
to program imperatively.

	-Vance




More information about the erlang-questions mailing list