I was at ECOOP last week, though I didn't stay til the end. My favorite part was the talk by Joe Armstrong on Erlang, and talking with him afterwards. I met Joe last year and have been following Erlang every since.
Erlang is going to be a very important language. It could be the next Java. Its main problem is that there is no big company behind it. Instead, it is being pushed as an open source project. Its main advantage is that it is perfectly suited for the multi-core, web services future. In fact, it is the ONLY mature, rock-solid language that is suitable for writing highly scalable systems to run on multicore machines.
Erlang started out over 20 years ago as a kind of concurrent Prolog. Joe Armstrong invented it, and he has been the main person pushing it. He was at Erickson, the Swedish telecom company, and the first big Erlang project was a electronic switching system that was built by a few hundred people, who wrote a few million lines of code. The emphasis was always on reliability, not raw speed, and the system has an incredible reliability history. Joe claims they have achieved "nine 9's of reliability".
What does that mean, "nine 9's of reliability"? It means 1 second of downtime in 1 billion seconds, or 1 minute of downtime in 1 billion minutes. Now, a billion seconds is roughly 30 years. A billion minutes is roughly 2000 years. This system has been in production for ten years or more, but less than 15 (I think). They have sold hundreds of them, perhaps thousands, but I think hundreds. Two hundred systems at ten years apiece give 2000 years of operations, so they can say they have "nine 9's of reliability" if they have had less than 1 minute of downtime total for all the systems they have installed.
"Five 9's" is about five minutes of downtime in a year, and is pretty good. People who are fanatical about reliability want six 9s, or even seven 9s. It is unheard of to have nine 9s. But a system built in Erlang has done it.
That is not what is going to make Erlang big, though. Not enough people care about reliability. Another thing that is not going to make Erlang big is that "sequential Erlang" is a functional programming language. Or that "concurrent Erlang' is an object-oriented language. The thing that is going to make Erlang big is that it is the only mature language with a rock-solid implementation and good set of libraries that lets you write software that can scale seamlessly from a single processor system to a hundred processor system. In a few years, all our desktop systems and laptops will be multiprocessors, and the only way to make our applications run faster on them is to make them use multiple processors.
When you build a system in Erlang, you write a set of processes that communicate only by passing messages between them. There is no shared state; the only way to communicate with a process is to send messages to it. (Or, to have it write to the file system, which is cheating. Or call C code, which is also cheating. There are actually lots of ways to cheat, but we'll ignore them.) Unlike Java or Smalltalk, where you only write threads/processes when you want concurrency, Erlang programmers use processes for modularity, reliability, and reuse. Then they get concurrency for free. Go build your application on a single processor. In theory, you could write it all as a single process, but no decent Erlang programmer would do that. They are more likely to write it as thousands of processes. It doesn't hurt performance on a single processor and makes it likely that it will make good use of a multiprocessor. Then, put it on a ten processor system and make your system run ten times faster (probably eight or nine times faster, but that is still pretty good).
Of course, just because you wrote your system as thousands of processes doesn't mean that it is scalable. You could have bottlenecks, as with any system. Processes could spend all their time waiting on other processes. But messaging is asynchronous in Erlang, and it is common to send a message to a process and to forget about it, expecting the result to be forwarded to another process. There are a number of design patterns in Erlang that tend to make systems scalable.
Erlang comes with a bunch of libraries. A lot of them are for building or using various kinds of internet services. Erlang has web servers and databases. The Erlang community has been positioning it as the language for choice for building reliable web servers and web services. But the package I find most interesting is the OTP, or the "open telecom platform". Not surprisingly if you look at the names of Erlang packages, it has nothing to do with telecom. It is a framework/platform for building systems that can run decades without being turned off, while updating your software every day and even replacing your hardware periodically. This is needed by telecom applications, but is also useful for on-line banking, on-line stores, and any web service that you want others to build upon.
Joe Armstrong as just finished a book on Erlang that is being published by the Pragmatic Programmers. Joe has a article about his book, too.
It is a very good book, and must reading for anybody interested in Erlang. The thing that bugs me about the book (and about his talks) is that he make more fuss than he should about the functional language aspect of Erlang and not enough about the OO aspect. In fact, he denies that it is OO.
Processes in Erlang are objects. At the beginning of my course on OO design, I explain three views of OO programming. The Scandinavian view is that an OO system is one whose creators realize that programming is modeling. The mystical view is that an OO system is one that is built out of objects that communicate by sending messages to each other, and computation is the messages flying from object to object. The software engineering view is that an OO system is one that supports data abstraction, polymorphism by late-binding of function calls, and inheritance.
Erlang is a perfect example of the actor model, which is an example of the mystical view. Processes certainly support data abstraction and polymorphism. An Erlang process is a function that reads from the incoming message queue, pattern matches to find a particular message, and then responds to it. A function structured in this particular way is similar to a class in Smalltalk. Moreover, given several kinds of processes that have a common protocol and that share some things in common, it is easy to factor out the commonality into a function that they can both call. This is similar to class inheritance. So, you could even say that Erlang supports inheritance, though it does it very differently than in Java or Smalltalk. I imagine that many Erlang programmers think about programming as modeling. So, Erlang fits all the characteristics of an OO system, even though sequential Erlang is a functional language, not an OO language.
One way that Erlang differs from OO languages is its emphasis on failure. Any message can fail. Processes don't raise an exception, they fail. Systems are structured as worker processes at the bottom that are likely to fail, with manager processes above them that restart the failed processes. Because programmers expect processes to fail, they
Joe makes too much of functional programming because he says that lack of mutable state implies no locks. However, it is really lack of SHARED state that implies no locks. You could write processes in Basic, perl, or C. I'm sure that lots of people will look at Erlang and say "we can add that to our language". In my opinion, it is the concurrent programming aspects of Erlang that make it special, along with its mature implementation and powerful library designed for concurrency and reliability.
I do not believe that other languages can catch up with Erlang anytime soon. It will be easy for them to add language features to be like Erlang. It will take a long time for them to build such a high-quality VM and the mature libraries for concurrency and reliability. So, Erlang is poised for success. If you want to build a multicore application in the next few years, you should look at Erlang.