Erlang is dead. Long live E…?
Disclaimer: I love Erlang. From 2005 to 2015 I ran erlanger.ru (mostly alone, as editor-in-chief, content creator, developer — you name it). It is my favourite language, and this isn’t going to change any time soon. Exactly because I love it, I see problems with it.
- Problem Statement
- Ericsson’s Baby
- A Brief, Incomplete, and Mostly Wrong History of Erlang
- Java Is the New Erlang
- Erlang Is the New … Nothing, Really
- Is There Hope Yet?
Other languages are getting better at being Erlang than Erlang is getting better at being other languages.
Erlang is first and foremost Ericsson’s baby. Thus, enterprise and telecom are the two things that influence Erlang the most. It is Erlang’s greatest strength and it’s greatest weakness.
Enterprise side of things made sure that Erlang has got to be one of the most stable languages out there:
- Breaking changes, if any, are introduced very rarely, with clean and understandable upgrade paths often split over multiple releases.
- New features are folded into the language or the standard library after a lot of careful deliberation and on an “absolutely needed” basis. They are also introduced gradually, often over the course of several releases.
Telecom side of things made sure that Erlang is also probably the language that got more things right from the start (or nearly from the start) than any other language:
- lightweight processes
- immutability, gen_* patterns in OTP etc.
The problem, however, this no longer matters.
A Brief, Incomplete, and Mostly Wrong History of Erlang
- 1990s: Erlang is lightyears ahead of anyone with processes, distribution, OTP etc.
- early-to-mid 2000s: Erlang is on the bleeding edge with SMP, distribution
- late 2000s to mid-2010s: Erlang is … mainstream at best
Java is the new Erlang
This may be hard to swallow, but Java is the new Erlang. And other languages either piggyback Java, or are fast developing to provide competition in many areas.
Let’s look at the most common tools that everyone uses or knows about in areas where Erlang is supposed to shine: Hadoop, Kafka, Mesos, ChaosMonkey, ElasticSearch, CloudStack, HBase, <insert your project>.
For every single of your distributed needs you will take Java. Not Erlang.
In other rapidly developing fields such as IoT, there’s Java again, C/C++, Python. Rarely, if ever, Erlang.
And the trend will only continue. Server management and monitoring tools, messaging and distribution, parallel computing—you name it—sees an explosion of tools, frameworks and libraries in most languages. All of them encroaching on space originally thought to be reserved for Erlang.
Erlang Is the New … Nothing, Really
While others are encroaching on it’s territory, Erlang has really nothing to fight back with.
Even today Erlang is a very bare-bones language. An assembly, if you will, for writing distributed services. Even if you include OTP and third-party libraries. And, as a developer, you have to write those services from scratch yourself. Not that it’s a bad thing, oh no. But in a “move fast and break things” scenario having to write lots of things from scratch may break you, and not others.
Erlang is a language for mad scientists to write crazy stuff for other mad scientists to use or to be amazed at (see my lightning talk from 2012)
Anything else? Well,
- There’s Java for anything related to distribution
- There are Python’s great interfaces to scientific and statistical libraries
- There’s basically any language for strings, images, graphs, database interfaces—anything, I tell you
This leaves Erlang… well, in limbo.
Is There Hope Yet?
I really really don’t know. I really hope though.
Due to its heritage Erlang will evolve slowly. It’s a given, and it’s no fault of the brilliant people who develop Erlang.
Other languages for the Erlang VM? Maybe. As we have seen with Elixir, in three years it’s got more development (both in the language itself and in the available libraries) than Erlang got in 10 years. We can only hope the drive will not subside. Will there be a “Hadoop.ex” to rival the Java Hadoop? I don’t know.
Incidentally, a lot of the praise that now comes towards Elixir mentions Erlang only in passing. As in “compiles to Erlang” or “runs on Erlang VM”. And may be this is exactly what Erlang needs: become for (Elixir|LFE|Efene|…) what JVM became for (Scala|Clojure|Groovy|…)?
Erlang is far from dead. It’s alive and kicking (some butt, if need be). Will it do that for long? In a “let’s choose between languages A, B, and Erlang for scenario X” will there remain a scenario X where Erlang will remain relevant and/or a valid choice?
I don’t know. I sure as hell hope.