[erlang-questions] Learning Erlang from the scratch

G Bulmer <>
Fri Aug 31 18:10:58 CEST 2007


Hi Lone

On 8/31/07, Lone Wolf <> wrote:
> I'm an enterprise Java developer.
> What is the best way to learn Erlang language from the scratch?
> Can I depend on the new PragmaticProgrammer book "Programming  
> Erlang" ? or this books assumes the reader is Erlang programmer ?
> BTW, I don't know "Functional Programming" at all.
> Thanks.

I concur with the comments on 'Programming Erlang. Software for a  
Concurrent World' by Joe Amstrong - Briliant I give it 9 out of 10  
(very small room for improvement :-). It really does start out with  
very few assumptions, and uses C and Java occasionally as examples of  
'traditional' code.

After 10 days, I'm more than 50% through (and I do have a life).  
IMHO, the writing style is better than Joe's lectures and blog. It  
reads like he really wants you to try Erlang, and it's presented in a  
very practical, hands-on style. He uses the interactive shell to get  
you started, and hence avoids having to show a load of detail before  
you can get some results. I found myself extending bits of code,  
trying to write little servers and stuff while watching TV (yes,  
Erlang is that addictive). I hope the book does for Erlang what the  
'Pickaxe' book did for Ruby.

I would recommend getting the PDF of the book too (if you have a  
computer next to you a lot of the time). The PDF gets a 60% if you  
buy the book (you can buy the book from elsewhere, and still get the  
discount from the pragmatic' web site). I sometimes found the books  
index a bit weak, but the searchable PDF is well worth the $9.

I strongly suggest you get started with Joe Armstrong's book, *but*  
If you feel *very* nervous about Functional Programming, or want to  
understand alternative Functional Programming technologies, I  
recommend Programming in Haskell (Paperback) by Graham Hutton. I've  
looked at most Haskell, SML and OCaml books, and this is far and away  
the most approachable. BUT be aware that Haskell (and the rest) are  
statically typed (and have very, very powerful type systems), and  
Erlang is dynamically typed. Sequential Erlang is more like Lisp/ 
Scheme with helpful syntax than the newer FP languages, so be careful.

Another idea for exercises - you might take a look at "The Computer  
Language Benchmarks Game" at http://shootout.alioth.debian.org/
They have a bunch of small benchmarks coded in Java and Erlang (and 30 
+ other languages), so you can see how the same algorithm would be  
coded in both languages, or try coding it yourself based on the Java  
code. Who knows, you may come up with a better implementation.

HTH - Garry B-)




More information about the erlang-questions mailing list