What is Expressiveness in a Computer Language
Joachim Durchholz
jo at durchholz.org
Sat Jul 1 03:28:22 EDT 2006
Matthias Blume schrieb:
> Erlang relies on a combination of purity, concurrency, and message
> passing, where messages can carry higher-order values.
>
> Data structures are immutable, and each computational agent is a
> thread. Most threads consist a loop that explicitly passes state
> around. It dispatches on some input event, applies a state
> transformer (which is a pure function), produces some output event (if
> necessary), and goes back to the beginning of the loop (by
> tail-calling itself) with the new state.
Actually any Erlang process, when seen from the outside, is impure: it
has observable state.
However, from what I hear, such state is kept to a minimum. I.e. the
state involved is just the state that's mandated by the purpose of the
process, not by computational bookkeeping - you won't send file
descriptors in a message, but maybe information about the state of some
hardware, or about a permanent log.
So to me, the approach of Erlang seems to amount to "make pure
programming so easy and efficient that aren't tempted to introduce state
that isn't already there".
Regards,
Jo
More information about the Python-list
mailing list