Impressions of Mozart-Oz

Håkan Millroth <>
Tue Dec 10 19:13:00 CET 2002

I taught Prolog / Logic Programming at the University for 7 years and 
my experience is that 90% of the students have big problems with:

1. Using logic variables (unification) efficiently.
2. Restricting non-determinism (backtracking) to places where you want 

The remaining 10% typically gets hooked for life :-)

Prolog is a hard language for hard problems (as Alain Colmerauer, the 
father of Prolog, once said). It is a power tool that's hard to beat 
for the type of problems it was intended for - concurrency is not one 
of those problems though. Writing a compiler or natural language system 

Here is a useful metric for evaluating languages: The difference in 
code quality between someone who is really good at using the language 
and the average Joe [no offense, Joe :-)]. In Prolog, that gap is 
enormous, partly because bad Prolog programs are really bad (and this 
is mostly due to uncontrolled and unwanted non-determinism). In Erlang, 
the gap is much smaller - not-so-good people can actually write decent 
Erlang code.

This is exactly what made me interested in Erlang in the first place: 
Compared to most "exotic power languages" (Prolog, Haskell, Oz, etc, 
etc) it is/was (*) so restricted and simple - and yet surprisingly 
efficient at handling the types of problems it was designed for. The 
proof was the 4-day Erlang course Ericsson once used for teaching 
people Erlang - at the end of the 4th day, people with very little 
programming experience could do some amazingly advanced things.

(*) This was back in the old days, before stuff like list 
comprehensions, funs, etc, were added to the language. A good thing for 
skilled people but a bad thing for the average guy (because he won't 
understand it).

Regarding Mozart-Oz: Implicit communication using logical variables in 
concurrent programs definitively gets too hard to use for non-wizards.

-- Hakan

Hakan Millroth
Nortel Networks

More information about the erlang-questions mailing list