[erlang-questions] Process scope variable

Imants Cekusins imantc@REDACTED
Thu Feb 19 15:34:14 CET 2015


Hi Fred,

thank your for taking time to read this.

well the "state" gs calls would be quite fail-proof: get_state,
set_state. The gs would only hold the state and make it accessible
from anywhere.

the rest of the program flow stays pretty much intact, no?


to operate on the state variables I would still need to get state,
assign it to a local variable in a function, then pass it to some
function to work on this var.

I do not aim to completely eliminate args. e.g. there would still be funs like
parse(Bin) -> #parsed{}.

it would be obvious from parse/1 signature that it does not change the
state - another benefit.



More information about the erlang-questions mailing list