Is it Erlang’s semantics that really rub people the wrong way?
... after seeing O’Caml, Haskell, and Clojure before, Erlang feels
a bit easier to get the hang of. Erlang’s semantics indeed throw
people off, especially those who know a C-style language.
I write in Haskell, I knew OCaml, Racket is a friend of mine. Erlang is no Clojure.
The problem with Erlang is not one of semantics, it's one of syntax. I find the syntax of Erlang jarringly bad.
Disclaimer: I've been doing Erlang now for a handful of projects for a year and a half, and I love it.
The syntax is a little jarring at first, more-so than most languages, but it's really not that bad. And as long as you stick with OTP, generic servers, and the like, you get to avoid some of issues that can make Erlang code harder to follow (naked bang message passing, spawning processes directly, etc).
Frankly, I think the syntactical warts (ending line variations, record syntax, if-statement construct, etc) are well worth it for the benefits of message passing, lightweight process spawning, pattern matching, code hot-swap, and particularly locational transparency.
At the very least, Erlang is an interestingly different enough language that I recommend it for anyone to spend a few weeks to learn at least the basics.
People who complain about its syntax, I suspect are simply too set in their own ways to change.
There is nothing about the Erlang syntax that is odd or foreign. Unless you come from another language, if you pick up Erlang as a first language you will find other language syntax as odd.
Not only that, but because it's a functional language you tend to think about functions in a more algorithmic way and a more proper process isolated way of programming.
This makes for functions that ALWAYS work as intended without side-effects.
This quote from the post says it all: "I actually haven’t finished the book yet – I’m at the end of the first chapter".
It's great that the author is learning a new language, but maybe wait until you've actually done something with it or at least finished the book to write about it? First impressions don't mean much.
Actually, that's not what he said. Here's the full quote:
"I’m at the end of the first chapter that explains how Erlang’s concurrency features work"
A quick look shows that it's the sixth chapter. Either way, he's clear about this disclaimer, and his post was enough to peak my interest in this specific book.
For you, first impressions _do_ seem to mean much.
That was also the first chapter in the book where suddenly Erlang seemed freaking amazing. Up until then, it was just a functional language with an odd syntax. After the introduction to message passing and concurrency, I was in love.
9 comments
[ 3.0 ms ] story [ 27.8 ms ] threadThe problem with Erlang is not one of semantics, it's one of syntax. I find the syntax of Erlang jarringly bad.
Try this for a longer rant: http://damienkatz.net/2008/03/what_sucks_abou.html
The syntax is a little jarring at first, more-so than most languages, but it's really not that bad. And as long as you stick with OTP, generic servers, and the like, you get to avoid some of issues that can make Erlang code harder to follow (naked bang message passing, spawning processes directly, etc).
Frankly, I think the syntactical warts (ending line variations, record syntax, if-statement construct, etc) are well worth it for the benefits of message passing, lightweight process spawning, pattern matching, code hot-swap, and particularly locational transparency.
At the very least, Erlang is an interestingly different enough language that I recommend it for anyone to spend a few weeks to learn at least the basics.
There is nothing about the Erlang syntax that is odd or foreign. Unless you come from another language, if you pick up Erlang as a first language you will find other language syntax as odd.
Not only that, but because it's a functional language you tend to think about functions in a more algorithmic way and a more proper process isolated way of programming.
This makes for functions that ALWAYS work as intended without side-effects.
It's great that the author is learning a new language, but maybe wait until you've actually done something with it or at least finished the book to write about it? First impressions don't mean much.
A quick look shows that it's the sixth chapter. Either way, he's clear about this disclaimer, and his post was enough to peak my interest in this specific book.
For you, first impressions _do_ seem to mean much.