[erlang-questions] Erlang Intro/Evangelism Presentation

Torben Hoffmann <>
Fri Dec 10 14:53:20 CET 2010

Hi Ryan,

Sorry to add to the thread so late, but work got in the way ;-)

Anyway, I have had the pleasure to get management to accept Erlang so I have
some ideas about what should be said about Erlang so that people get an idea
of what it is good for.

Erlang was introduced with a specific purpose in mind -
see http://reid.citizendium.org/wiki/Erlang%27s_original_domain

If you look at Bjarne's requirements you realise that Erlang can fit into a
lot of places and not just do well for telecom, but you knew that already

Some of the things I would stress about Erlang is that Erlang/OTP is what
one should be using.
It brings about some very insightful things that you really have to use.

E.g., the gen_fsm behaviour is - in the sense of Martin Fowler's terminology
from his book on Domain Specific Languages - a computational model that is
extremely well suited for implementation of protocols.
Not a big surprise since OTP was created for telecom, but you get a
framework that helps you deal with a non-trivial problem with extreme

This elegance and ease comes from the nice combination of the gen_fsm
behaviour and pattern matching.
You pattern match incoming messages, send some messages here and there,
update the state of the process and figure out what state to go to next. All
declarative and easy to read. I have implemented the Q.SIG protocol and the
SDL diagrams match up almost 1:1 with my code, i.e., message
sending/receiving blocks are one function call and the next state is, well,
the {next_state,...} clause at the end of the function clause. Try to
compare this with how you have to deal with state machines in C...

Pattern matching also makes dealing with the encoding and decoding of
protocols something you can do without loosing sanity since it allows you to
deal with the PDUs in a way that is very close to how they are specified in
most standards.

The overarching theme here is that the semantic gap between the domain you
are in (Bjarne's requirements)  and what the Erlang/OTP technology offers
you is very small and that means that you have to do fewer lines of code to
get the same thing done.
Here I will allow myself to do some self-promotion:
Be careful with this since putting 3x over Java in front of a bunch of Java
programmers is probably not as well received as putting it in front of
Erlangers at the EUC ;-)

I could add more, but I think you have enough for starters!


On Fri, Dec 3, 2010 at 19:43, Ryan Zezeski <> wrote:

> I've been tasked with giving an introductory level presentation on Erlang
> at
> work.  The focus is on why you would use Erlang and what does it look like
> on the surface level.  We have a lot of your standard Java/C#/C developers
> and this will act as a potential launching pad to introducing Erlang to the
> company.  There is the potential for a large number of people to video
> conference into this possibly spanning several countries so I really want
> to
> knock this out of the park.
> I'm writing as an inquiry for links to any prior art that I may use for
> inspiration or even steal and use as my own.  Anything that you think might
> be helpful is appreciated, even input on possible approaches.  I'd really
> like to hear from people who have done this sort of thing before, i.e.
> pubic
> speaking on Erlang.
> Thanks,
> -Ryan


More information about the erlang-questions mailing list