Extending Functionality: gen_server_ext
martin j logan
Thu Mar 20 20:10:31 CET 2003
I really should have said side-effect not used global as an example of
I was actually referring to something like ETS. It seems to me that it
can serve much the same purpose as put/2 get/1 i.e a side effect of
sorts or "global" storage at one scope or another. We all try to stay
away from such things but sometimes we break referential transparency,
alter a value that has nothing to do with the expression being
evaluated, when it is convenient.
On Thu, 2003-03-20 at 12:29, Vance Shipley wrote:
> On Thu, Mar 20, 2003 at 10:55:37AM -0600, martin j logan wrote:
> } Code is mostly referentially transparent except when it is
> } "simpler" to cheat and have a global,
> I was thinking recently about how I struggled with how to write
> code without global variables when learning Erlang. "How the hell
> can you live without globals?" I asked. It reminded me of learning
> the C language. "How the hell can you live without GOTOs?"(*) I
> asked having only ever programmed in BASIC. I've never used either
> and no longer see any reason to do so.
> (*) C does have a goto but you're told not to use it just as you're
> told not to use the process dictionary.
More information about the erlang-questions