A tale of two concurrency models: comparing Go and Erlang

A very interesting article:
"Out of all the languages that I never get to program in, Erlang is probably my favorite. I used it while I was working on my Ph.D., and a few times in private projects since then, but there's very little consulting work going for Erlang programmers, so it's rare for me to get to use it.

That said, when I started learning Go, Erlang was the first thing that came to mind. It's also the language mentioned in most common criticisms of Go that I encounter when I talk about my new Go Phrasebook. A common complaint is that Erlang's concurrency model is much cleaner than Go's. In this article, I'll look at both and show that it's possible to express either in terms of the other-neither language is inherently superior, but both expose different models to the programmer.

One thing that may confuse people with a theoretical computer science background is that Erlang takes some syntax from Hoare's Communicating Sequential Processes (CSP) model, but with different semantics, whereas Go takes the semantics but not the syntax. More confusingly, Erlang's semantics are fairly close to early versions of CSP, but not to later ones."

No comments: