Hacker News new | ask | show | jobs
by rdtsc 2971 days ago
I've had about the same experience getting started with Erlang. It was mostly using recursive, immutable state and the functional style that was hard to get my head wrapped around.

Pattern matching was somewhat hard but you can of course program by not using them, then during code reviews, you start getting advice like "split into a separate function clause". So bit by bit I started to get patter of using patterns and guards.

A thing that helped there was watching Garrett Smith's "Beautiful Erlang" video:

https://www.youtube.com/watch?v=IdJwECjylB4

On concurrency I had already did enough programming with threads before that and didn't have much difficulty understanding processes, pids and messages. Well except for being happy to get isolated heaps, smaller size threads (a few KBs) and supervision trees.

2 comments

It's funny how people understand different things in different ways. For me, 00 style programming was what I could never get my head fully around. Erlang immediately made sense to me. It's my favorite language and I wish I could use it more on the job.
I find that the harder with immutability is to go for it with a blank head. After that it's ok.

Indeed if i use my xp from other languages, my brain screams that it's ineficient and will kill perfs. Old habits die hard.