[erlang-questions] process dictionary, anyone?

Torbjorn Tornkvist tobbe@REDACTED
Mon Apr 30 10:11:35 CEST 2007


Tony Rogvall skrev:
> Hi !
> 
> I think most of us has used put/get at some point.
> It will ALWAYS hit you back. You will spend hours trying to locate  
> the place
> where things went wrong. I do use put/get and I think you will too.
> But it's NOT a great little hack it's a disease.

Well spoken Tony!

To all Erlang newbee's: stay away from the process dicts!
In fact, try to stay away from any destructive operation.

After 15 years of Erlang hacking I almost never use the proc.dict
(perhaps once every third year or so...:-)

Cheers, Tobbe

> 
> Happy hacking
> 
> /Tony
> 
> 
> 
> On 30 apr 2007, at 00.53, Bob Ippolito wrote:
> 
>> You can represent any non-functional construct with message passing. A
>> side-effect is a side-effect... Erlang is clearly a hybrid language,
>> but it has a very useful subset that is purely functional. Much of
>> what I've read in the standard library is written in that purely
>> functional subset, and the syntax and features of the language/VM seem
>> like they're designed to encourage and support mostly that subset.
>>
>> Using the process dictionary is a great little hack that saves you
>> from refactoring a bunch of code to include an extra state variable...
>>
>> -bob
>>
> 




More information about the erlang-questions mailing list