Impressions of Mozart-Oz

James Hague jamesh@REDACTED
Mon Dec 16 17:01:29 CET 2002


Luke Gorrie wrote:
>On the other hand, it's probably true that passing the whole
>state record around and updating it in the furthest corners of
>your process is a sign of poor design.

I agree.  There's a point where having a globally accessible state becomes
less intrusive than threading that state throughout your program in a purely
functional way.  There was a long thread about this in comp.lang.functional
some time back, which coincidentally was started by Peter Van Roy, the
driving force behind Mozart/Oz (he was attempting to demonstrate why Mozart
is multi-paradigm).

Taking away all forms of globals rapidly gives state updates for many large
programs a puzzle-like feel.  You get this a lot in Haskell.  There's too
much mental effort for something fundamentally easy.

Wandering a bit, I'd be curious to know about the history of the
undocumented "vector" module, a C implementation of functional arrays.
Sometimes not having fast array updates hurts, and this sounds like a good
solution.  But it has been in stealth mode for a couple of releases now.

James



More information about the erlang-questions mailing list