[erlang-questions] *current* value?

YC <>
Wed Oct 17 20:10:37 CEST 2007


On 10/17/07, Ola Andersson A <> wrote:
>
>  > Normally you never use the process dictionary. You could use a named
> ets table instead
>

Ets feels rather heavy for what I'm thinking about (see below).  What's the
pro/con between ets and process dictionary?

> but there are very very few
> > situations where you actually need either of those.
>

What I'm trying to figure out is if there are language support to access
variables that are not passed in, and hence "current", i.e. self() is the
function that returns the address of the current process, without it having
to be on the signature of every function that needs it.

> Most of the time there is some sort of main loop where the code is
> executed. The input data to the > loop function
> > is the place to use as storage for any data you need to keep.
>

I'm not sure if I follow.  Are you saying that the variable within the main
loop can be accessed directly from the worker function without being passed
in?

Thanks,
yc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20071017/20090839/attachment.html>


More information about the erlang-questions mailing list