News for hackers. Stuff that matters.
Re:Ask HN: How best to learn software design principles? by angersock on Tuesday July 08, 2014 @12:42AM (#8003031)
Seconding Erlang, and the pirate book (OTP in action; dude on cover looks like a pirate, maybe a Janissary).

The thing about Erlang/OTP isn't just that it's a functional language, but that--for a beginner--it's very small and practical. I describe it as "a functional language written by people whose jobs depended on it".

OTP (effectively, production runtime library and development patterns) is built on really sound engineering principles, and you can learn a lot from the explanation of why you build things a particular way while reading the pirate book.

EDIT:

The main reason that the functional aspects of Erlang are so cool when contrasted with Haskell or Scala or whatever is that they are so deeply tied into how the language functions in a production setting. It's not a matter of "my, how clever", but more of "oh, that makes implementing this reilably a shit-ton simpler".

As an example: actors in Erlang (processes there) are implemented as side-effect free functions which accept messages and manually pass state around. As a consequence, we get code hot-loading for free--you can simply swap out the update functions and run a helper to update the actor state before resuming it's run cycle using the new update function.

That's wicked cool, and is something that just falls out from the pragmatic language decisions made earlier in its history.

There are no comments on this comment yet.