A couple of days ago, there was yet another blog post on Reddit about the scalability of Erlang, with the same yaws-owning-apache graph we’ve all seen before. There was absolutely nothing new in the entire post.
In my opinion, there are many reasons to use Erlang that have nothing to do with server performance.
Those of you who found BeerRiot through the Ask Reddit thread about Erlang usage already know that it’s built on Erlang and Erlyweb. My experience with them will be different than others’, of course, but I felt the need to list a few of my [completely subjective] observations about this framework.
So, in no specific order:
- I like the syntax. I got past the comma-semicolon-full-stop confusion that many complain about within the first few hours of coding. It’s different, refreshing, and not too hard to understand.
- Development cycles go really fast. More than once, I’ve hashed out some new functionality on my subway commute, then polished it at home and posted it the same evening. Part of this is the pattern matching used in function calls and branches – it translates almost directly from my pseudocode.
- Some complain about the lack of hierarchy and types – I love it. It makes evening coding feel very free-form after eight hours of Java.
- Erlyweb and Yaws are both very powerful and useful, yet their codebases are small enough that the thought of digging through their code does not intimidate me.
- Erlang doesn’t have all of the libraries of other languages yet, but they’re not hard to get to.
- Hot code loading and the ability to open a shell connected to your webserver doesn’t get enough press. I never stop my webserver unless I’m making a huge change that I’m too lazy to plan the transition for.
- I dislike typing underscore. I do think it’s a good visual representation for “don’t care”, but I just don’t like to type it. I often use camelCase to define my own functions, but it looks a bit messy in mixed code.
So, yeah, some of these are reasons to use Erlang, some are reasons to use any language with similar features, some are just things to note. I just felt like there needed to be some conversation about Erlang other than its scalability.
If anyone has any specific questions about my experience with Erlang, please post them in the comments. I’ll either answer here or write another post to cover them all in a few days.