[erlang-questions] Process scope variable

Richard A. O'Keefe ok@REDACTED
Wed Feb 18 00:43:21 CET 2015

On 18/02/2015, at 2:55 am, Imants Cekusins <imantc@REDACTED> wrote:

> Does anyone see any benefit from process scope variables?

No.  We already have the process dictionary, which is exactly that.
> E.g.
> a()->
> A = 10,
> b().
> b()->
> B = A + 1.

It's a good thing I haven't had any lunch yet, or I'd have a hard
time keeping it down at this point.


a() ->
    put('A', 10),

b() ->
    put('B', get('A')+1).

> This way, there is no need to pass a bunch of static variables around.

I'm not sure what you mean by "static variables".

More information about the erlang-questions mailing list