why concurrency in the first place?

Maurice Castro maurice@REDACTED
Mon Feb 5 22:51:38 CET 2001


> Hello,
> 
> 
> I know this may sound like a naieve question but I would like to have a
> thorough answer any way :)
> "Why does an (Erlang) programmer have to program his application with
> concurrency explicitly in mind?"
> I also know (think) that this was the main intention of the Erlang
> language.
> 
> Isn't it easier (cfr. Haskell) to free the programmer (=designer) from
> this burden?  If a programmer has to specify it (as is the case in
> Erlang), he will typically overspecify his system (even if the processes
> are light weight).

Erlang is primarily a language for expressing soft real-time behaviours.
Desirable features in such a language are explicit expression of concurrent
operations, easily predictable performance, and no surprises for the 
programmer.

Programming is the process of communicating, in a structured language,
the intentions of the programmer to a compiler. The compiler then produces
code that hopefully implements these intentions. Many of the translation
steps in the process are flawed. The programmer may not understand the 
problem, he may not specify it correctly, or the translated code may 
interact in an unexpected way with the system. 

The intentions Erlang seeks to model explicitly include parallel operations,
having the compiler work out what can be made parallel in fact seeks to
hide the very thing the language is design to make explicit.

Erlang happens to be a functional language to reduce the number of surprises
for the programmer.

	Maurice Castro



More information about the erlang-questions mailing list