system messages (Re: Suggested Example/ emacs questions)

Torbjorn Tornkvist <>
Tue Oct 10 12:07:13 CEST 2000


> OK, I don't know why I included put() -- I don't want that either.
> get() has no side-effects, though. That's the one I want.

But get() is not good either since it breaks the 
simple idea of a pure function, i.e:

 1. You can only affect the behaviour of a function
    by what arguments you are sending into it.

 2. A function may only affect its surrounding by what
    output it produces.

 3. The same input arguments should always produce
    the same output value.

So get() breaks both 1) and 3) and I think we already
got enough of side-effects in the language as it is today ;-)

Cheers /Tobbe




More information about the erlang-questions mailing list