Erlang is like an exotic beautiful woman with no dressing sense.
I came across Erlang about a year ago. It is a language of a kind - precise, crafted and powerful. Its been there for about two decades now, and people have been using it for serious real-time applications. But the hype Erlang is getting in the last couple of years is mostly for wrong reasons.
Having said that, its a language every programmer should look into at least once - its refreshing. And it might just be the perfect language that fits your needs.
What doesn’t Erlang have? It has its own Virtual Machine that it runs on. It is ridiculously simple to write distributed applications, with its message-passing style concurrency. It has its own database. It supports hot code swapping without even restarting the servers, and its already been proven in some telecom applications that need very high uptime. Hot code swapping is still a nightmare even in a supposedly mature language like Java which is targeted at building web applications - that have high availability and scalability.
However there are certain things that either suck or are not as convincing about Erlang.
1. Today’s mainstream developers who are used to C or Java like syntax wont find its Prolog-like syntax too friendly. Unless you started programming since the 80’s & 90’s and are used to languages of similar syntax, it will take quite some time before you get comfortable with Erlang’s weird syntax. I never felt too comfortable with the syntax.
2. While the core language itself is small and easy to learn, the libraries within the language are inconsistent, incomplete and poorly documented. I posted a couple of questions in the forums regarding how to use a library, and usually the answers would be “Don’t use that library, use the other one”. (Oh yeah, kind of like the Java JDK Logging. Please use Commons Logging.)
3. Only a few people have written production level codes and you rarely get to hear from them. All you hear from is Erlang enthusiasts, who are hyping it as the next big thing, but haven’t done more than a few labs from Armstrong book.
4. I can’t imagine how you can organize large code-bases in Erlang or even work as team, and this doesn’t feel right to any OO programmer.
5. Most of the performance matrices are one-sided, and are performed by people who have an interest in Erlang. I would love to see some independent analysis.
6. Its support for web-development is very primitive. With web frameworks like rails and grails, there is a lot of serious work for Erlang if it ever intends to go to that market.
7. Did I talk about Strings in Erlang? IO speed?
I know weaknesses aren’t as important as the strengths of a language. Erlang has it own expertise, its syntax structure, and its own audience. But the flaws of Erlang might just turn away a new programmer, even before he gets to its beauty.
If you are writing a web crawler, Erlang may very well be your choice. If you want to write a client-server, where the client makes a large no of requests, and you want to spawn concurrent processes to process the requests, Erlang could be your choice. If you want to write a Distributed Hash Table, Erlang could be your choice. Or if you are writing a video streaming server or doing system integration or writing any system utility. But a regular developer (building a CRUD application on top of a database, right? ) doesn’t have much to do with Erlang as yet. Secondly, even if you are working on those highly scalable, reliable and concrurrent systems, people have a hard time accepting Erlang along with its flaws.
The industry has a definite space for Erlang, currently and more so in future as we deal with more and more users, more data, and more forms of distribution. If not for Erlang exactly, then for an improved version of Erlang. It isn’t here to be the next Java, but to solve out the problems that Java couldn’t do smoothly in over a decade (despite having such a great community).
Erlang is going from an underestimated to an overhyped language. I wish it can convert the hype and raw interest in Erlang into something meaningful. How about a modern variation of Erlang on the Erlang’s virtual machine. Is it too late?
I think that the future of Erlang is exactly what you describe - particularly languages like Reia - which is a Ruby like language with Python style indentation, compiled to the Erlang VM. That type of innovation combined with new web frameworks that make web development easier will keep the wheels from coming off the admittedly near red-lining hype machine.
Didn’t know about Reia yet. Will definitely look into it. Thanks.
Most of the issues that you listed are in regards to Erlang’s lack of support. As more and more people learn Erlang, those problems should start to go away.
Your assumption that writing CRUD web applications is what “regular developers” do is amusing. Web developers have very high visibility - largely because they tend to blog - but they certainly aren’t the majority of developers.
Google for Lisp Flavored Erlang - Erlang in lisp’s clothing
Re (3), normally people comment that the erlang-questions list is nice exactly because there are lots of people on it with experience from real-world development who are most willing to help out.
Looking e.g. at the September archive, quite a significant portion - I didn’t coun’t but I’d wager more than a third - of the posts were from seasoned experts with many years of commercial experience with Erlang. I’d say that this is consistently the case.
Re. (4), there are a number of very large code bases in Erlang - up to millions of LOC, and large teams - up towards 100 programmers. The experience of many who have seen large projects in both C++/Java and Erlang is that Erlang is much easier to work with - esp compared to C++ - in large projects.
Otherwise, I agree that there is some hype. More interesting is perhaps that more and more companies are using Erlang commercially, and more and more are hiring.
Hello,
have you tried http://www.erlang-web.org/ for CRUD web apps?
Also check out Nitrogen (http://www.nitrogenproject.com) for building powerful, event-driven web applications with Ajax updating, Comet, Drag and Drop, etc.
Thanks Rusty. I have been playing with Nitrogen recently and it looks really promising so far.
Was almost taking you seriously till you got point 4. There are some large projects written in erlang, but perhaps more importantly the structure in which erlang projects are designed dictates how they are organized. I think you’ve hit the nail on the head though. Most OO programmers have an object obsession and dont organize projects into logical functional components.
Performance “matrices” ? Did you mean “metrics” ?
Also, check out Efene, a language inspired by Python and Javascript which compiles to BEAM files. And if you like your whitespace significant, you can use its brother: Ifene.
http://marianoguerra.com.ar/efene/