Erlang use in Italy

Peter-Henry Mander <>
Sun Apr 10 20:33:48 CEST 2005


On Sun, 10 Apr 2005 12:06:21 +0200
Corrado Santoro <> wrote:

> I'm trying to do it... but the main problem is to overcome the 
> "resistance" of some people who say: "Concurrent programming? Ah, 
> pthreads... what other?" :-OO

Ah yes, I've had to contend with this for quite some time.

Unfortunately trying to explain the benefits of Erlang concurrent
programming to someone more versed in C or any other low level language,
they will often take each individual feature in isolation and reply "so
what? I can do that too in C." Of course you can, but there's more
effort involved, its more error prone, and it takes much longer to get
it to work correctly. If you follow their reasoning to it's absurd
conclusion, you may as well write all programs in binary digits without
the aid of compilers. That's what programs are compiled into after all!

You may try to convince them that the *combination* of features offered
by Erlang and the way Erlang programs are written leads to far less
programming errors and quicker results (not quicker programs mind you,
but read below) and shorter delivery time to customers, and money in
your pockets sooner. But I've found that low level programmers are
usually too busy hunting down a mysterious intermittent bug, and have no
time to spare in fruitful discussion because the deadline died a long
time ago and the customer is breathing down their necks.

I still hear the guys using C or C++ where I work talk at great length
about memory management issues, messaging queue implementations and
distribution across nodes, mutexes, semaphores, race conditions,
database replication etc... even after more than THREE YEARS of
development effort! All the stuff that Erlang gives you with little or
no effort. These problems are so *old* and have been analysed and solved
many times over before. To have to reinvent the wheel for every new
project seems a total waste of time, and yet these guys persist. It's
like a macho programmer culture; unless you do it the hard way, you're
simply not programming!

I think the most convincing way of introducing Erlang into a project is
to have it available and ready to replace a failing project, or to fill
a need that no one else has been able to satisfy. Otherwise people will
simply stick to what they know and are comfortable with, which usually
means C.

One cause of resistance is the need to learn a different programming
paradigm. Only those programmers who encountered Prolog during
university seem willing to try it out. The logic/functional programming
idiom seems to mystify a lot of imperative programmers.

Another argument against Erlang is speed. With simple or moderately
complex programs, certainly C will win outright with up to 10x speed
advantage. However, when you deal with massively concurrent systems as
in telecoms, you have to keep feeding many mouths, avoid getting bubbles
in the plumbing, and maintain throughput throughout the whole system to
achieve optimum performance. Get it wrong and performance drops like a
proverbial lead balloon, and may God help you find the cure! Using
Erlang at the outset will help enormously to ease these kinds of
problems.

Persist as long as you can Corrado, you may end up with them saying "Oh
no, not Erlang *again*!" whenever they see you :-)

Pete.
-- 
"The Tao of Programming
 flows far away 
 and returns 
 on the wind of morning."



More information about the erlang-questions mailing list