[erlang-questions] suitability of erlang

Richard O'Keefe ok@REDACTED
Fri Oct 12 04:17:14 CEST 2012


From my perspective, the event loop approach has always been
a bug-ridden nightmare.  The idea of turning a multi-thread
program into an event loop one in order to *remove* bugs is,
wow, magno bizarro.  I mean, it's like trying to cope with
mice in the house by releasing a lot of large hungry rats.
Yes, they'll eat up the mice, but then you have worse problems.
People who recommend rats (I mean event loops) are thinking
about threads in languages that don't really understand them.
It's hard to imagine a Concurrent Pascal, Occam, or Ada
programmer thinking their program would be improved by turning
it inside out and back to front.  But then, Concurrent Pascal,
Occam, and Ada compilers have a clue about what's going on, and
prevent you writing code that has data races and so on in the
first place.

If you want high performance, then in a multicore world turning
threads into an event loop is the very worst thing you can do,
because that one thread is going to run on one core and the
others will sit idle.  Again, whatever validity the advice may
once have had was limited to single-core cpus with heavy-weight
threads and high thread switching overheads.  Not Erlang.




More information about the erlang-questions mailing list