Slashdot Mirror


Erlang's Creator Speaks About Its History and Prospects

Seal writes "Erlang, originally created at Ericsson in 1986, is a functional programming language which was released as open source around 10 years ago and flourished ever since. In this Q&A, Erlang creator Joe Armstrong talks about its beginnings as a control program for a telephone exchange, its flexibility and its modern day usage in open source programs. 'In the Erlang world we have over twenty years of experience with designing and implementing parallel algorithms. What we lose in sequential processing speed we win back in parallel performance and fault-tolerance,' Armstrong said. He also mentions how multi-core processors pushed the development of Erlang and the advantages of hot swapping."

11 of 48 comments (clear)

  1. Facebook's Use of Erlang by miller60 · · Score: 5, Informative

    Erlang is used in Facebook Chat, which just hit 1 billion messages a day. Eugene Letuchy discussed Facebook's use of Erlang at the Erlang Factory event.

  2. The power behind CouchDB by slim · · Score: 4, Interesting

    I notice that CouchDB makes a big deal of its Erlang based core -- essentially "this part is trustworthy and parallelises well because it's in Erlang".

    I also notice Joe Armstrong (or more likely a transcriber) is as bad at spelling "lose" as the rest of the internet...

  3. CSP makes parallel programming easy by TheRaven64 · · Score: 5, Interesting

    Describing Erlang as a functional language is true, but misleading. It's not a pure functional language, because there is a (mutable) process dictionary. When you call something a functional language, it implies a language modelled on Lambda Calculus. The fact that functional languages do not allow side effects (Erlang does via the process dictionary) means that they are relatively easy to parallelise implicitly. Erlang adds support for the Communicating Sequential Processes (CSP) formalism on top of a mostly-functional core language.

    CSP is a very clean and simple model for describing parallel algorithms. The language enforces the restriction that no data may be both shared and mutable. The only mutable object in Erlang is the processes (which has a dictionary and some execution state). Everything else is immutable. This makes it trivially easy to write code that uses a few tens of thousands of Erlang processes (or more). These are implemented as (very) light-weight threads on top of OS threads and can easily scale up to a large number of processors, or even cluster nodes. The asynchronous aspect of the message passing means that it is not very difficult to write code that scales well across a cluster; bandwidth can be an issue, but latency generally isn't in asynchronous code.

    --
    I am TheRaven on Soylent News
    1. Re:CSP makes parallel programming easy by TwistedSquare · · Score: 3, Informative

      Erlang is based on the ACTOR model, not CSP. The main practical differences between Erlang and CSP is that Erlang uses asynchronous dynamically-typed messages sent to a particular address (process id), whereas CSP systems usually deal with synchronous messages sent down a particular, typed channel. But they are both message-passing systems with the idea of removing shared mutable data, as you say. For an implementation of CSP in the pure functional language Haskell, see my library CHP (http://www.cs.kent.ac.uk/projects/ofa/chp/).

    2. Re:CSP makes parallel programming easy by radtea · · Score: 2, Interesting

      the pure functional language Haskell

      <nitpick>

      Calling Haskell a "pure functional language" is a bit like calling C++ a "pure object-oriented language." There are parts of the Haskell language that allow you to do pure functional programming. But there are parts of the language that allow you to do things like I/O, too.

      </nitpick>

      --
      Blasphemy is a human right. Blasphemophobia kills.
    3. Re:CSP makes parallel programming easy by jbolden · · Score: 3, Interesting

      The analogy would be to call C a "low level language" even though C++ exists with high level extensions like the template system.

      What makes Haskell pure is that stateful code like I/O is handled through a monad so that it doesn't leak out into the rest of the code. The purpose of a computer program is to create a side effect. So every language needs to include some capacity to induce them. What separates pure from impure is whether side effects are scattered throughout the code or isolated.

    4. Re:CSP makes parallel programming easy by jonaskoelker · · Score: 2, Interesting

      The purpose of a computer program is to create a side effect.

      Back in the good old days, Haskell programs had type String -> String ;-)

  4. If you want to know more... by jandrese · · Score: 3, Informative

    There is even a movie about Erlang that should give you a good idea of what its strengths are.

    --

    I read the internet for the articles.
  5. Why can't more people think like this... by DragonWriter · · Score: 4, Insightful

    I wish that this could become a universal precept of software design, shaping everything from OS's to desktop apps -- Joe Armstrong: "Stopping a system to upgrade the code is an admission of failure."

  6. flourished? by blueskies · · Score: 2, Insightful

    flourished ever since

    define flourished.

  7. Programming Erlang by lewiscr · · Score: 3, Interesting

    I've been (slowly) working my way through Programming Erlang.

    I spend most of my day doing procedural and OOP. Odds are good that I'll never write a single Erlang program after I finish the book. But I guarantee that I'll be using the concepts that I'm learning for the rest of my life.

    For the same reason you had to take liberal arts classes in university, everybody should learn a functional language or two.