hit counter


My development logbook

Why I Choose to Learn Erlang?

Just think it may be worthwhile to commit it in writing for sharing.

In summary, my decision is only partially based on the technical merit or language features.

First take a look back at year 2001. Motivated by the desire to find a better, more reliable way to develop software, I learned and switched to Linux platform in this year. For anyone serious in learning unix family OS, bash, awk, sed and perl scripting are literally the “basic dance steps”.

Then I moved on to Python (see my first blog if you have plenty of time to waste :–) ).

Now fast forward a few years. From Python, I soon learn about these big names such as Guido van Rossum and Peter Norvig etc, and for some reasons, stumbled upon Paul Graham and his famous essays.

One of his famous idea on computer language is: there are reasons why some languages are superior than other languages, and Lisp is the most powerful among them. (Alright, I made the assertion for him, he probably never really put it exactly this way. Did he?)

So, convinced by the argument that a language is key to a programmer’s productivity, I decided to give Lisp a try. The syntax, or the lack of it, is indeed a challenge, but the concept of “code is data, data is code” is very powerful. Macros and CLOS are effective techniques in Lisp programming.

Fortunately there are a lot of resource.

Actually I should put it this way: “too much resource”.

Indeed, if you look at variety in the implementations of mainstream Lisp, and its derivative, Scheme, you will find these choices: Common lisp (clisp), CMUCL (CMU lisp), Kawa (Scheme on JVM), PLT Scheme, Scheme 48 etc… The list goes on and on.

It is the common phenomena of *nix world: the Fragmentation.

As a result, for any partitioner in commercial software world, it becomes a hard problem: given limited free time for self-study, we are confronted with these choices:

  • which language (Lisp or Scheme)?
  • which version (R5RS or R6RS or some subset, in the case of Scheme)?
  • which implementation of the language (the usual portability vs power/library issue)?
It makes my research long and tedious. If I bet on a wrong horse, I will lose a lot of valuable time, right? What if I am in a middle of a project and encounter a bug in the lisp/scheme interpreter I am using, will there be adequate community support? What if…

Does the risks justify the potential gain from the use of Lisp/Scheme?

Then I discovered Erlang.

The following reasons make me think, form my particular situation and career need, Erlang is probably the safest bet (or most cost-effective investment):

  • It has all the beauty and expressiveness of a functional language
  • You gain concurrency for free (built-in support in syntax and kernel)
  • You gain fault tolerance for free
  • You gain distributed processing for free
  • The language and library are robust and battle-tested in demanding Telecom industry.
  • It does not suffer from the implementation fragmentation of Lisp/Scheme.
  • The language evolution is well controlled (by Ericsson)
It is a pragmatic choice from a software builder’s point of view.