Comment by tommica

Comment by tommica 4 hours ago

5 replies

> Suddenly Erlang made it fun and programming became addictive.

I'm saying this with complete sincerity: WHAT IS IT THAT YOU PEOPLE SEE!? What is the fun? What are you addicted to? Typing and seeing the output? Solving a problem?

I feel like I am missing out on some amazing life altering experience when I see people state that. The same thing I have with the article - what does it mean to love a programming language?

christophilus 4 hours ago

It’s a subjective thing, but when a language clicks for you, work becomes pleasant. You get into (and maintain) a flow state. It feels as if you’re crafting something beautiful and elegant and simple. It’s the same reason people love painting, drawing, or sculpting with one specific medium over an other. They just like the aesthetic and process better.

Also, some languages just really stink— slow compilation times, obscure errors, loads of footguns and require much more care and focus on things which are orthogonal to the problem you’re trying to solve.

sam-cop-vimes 4 hours ago

I'll try and answer this.

Expressiveness: I could express a solution to a problem with very few lines of code and without the clutter of housekeeping operations like memory management.

Recursion: Erlang properly introduced me to recursion whereas I hadn't encountered it before. This is again related to expressiveness. There is something strangely beautiful about seeing a problem solved using recursion elegantly.

Message passing: when I was trying to figure out how Microsoft's C++ socket classes were implemented and I dug into the code, it turned out there was a hidden window for every socket created and messages were being passed to/from it, but message passing wasn't available anywhere in Visual C++ as a first class construct (at least as far as I remember it). I was overjoyed when I discovered that message passing was a first class citizen in Erlang and how much easier it was to implement concurrent programs than using native threads in C++.

Compared to OO programming in C++ where I was never sure whether I was using inheritance correctly, whether I needed inheritance at all, memory management, difficulty with threads, writing code in Erlang was a breeze.

And the whole support for distributed programming, hot code loading, list comprehensions! I fell in love again with Erlang when I discovered list comprehensions. Man, I could go on.

jacquesm an hour ago

It's a bit like cutting wood. Cutting wood can feel terrible. You do it every day because you have to. Along the grain, in wet wood, with a handsaw.

And then, one day you discover the chainsaw, and the fact that you should cross cut.

Suddenly cutting wood no longer feels terrible, it's smooth, stuff works the way you expect. Your chainsaw turns out to have features for all kinds of wood and for many different kinds of joinery that you were hand carving before. It turns out that your chainsaw can be used to control an army of chainsaws without having to do anything at all. You just declare it to be so and it works.

Instead of focusing on your tools all day long you find yourself focusing on the thing that you are actually trying to solve. Where you needed 50 people before, now you need 5.

cmoski 4 hours ago

Solving problems I guess. Have you used painful languages before? Imagine doing that, then discovering one that wasn't getting in your way all the time. It's easier to do things that are difficult in other languages. You can do so much on the BEAM, and you don't have to waste your time with thread pools or other nonsense.

knome 2 hours ago

when I program, I am visualizing the machine I am building in my head. some language semantics are cleaner than others, allowing the bits and pieces to flow together more naturally, composing in elegant ways that do not require pointless effort be spent manually wrangling footguns and minutia.