Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What an amazing language. I am working on a Elixir project, with a lot of Erlang peaces used directly. Integration is flawless and beautiful to observe. I do have many languages in my toolbox but only few of them were truly exciting for me, Haskell six or so years ago and Elixir/Erlang/OTP this year.


I've really wanted to dig into functional languages like this, because I love the theoretical benefits they provide, but haven't really sunk my teeth into one in a way that would let me understand the flavor.

Let me ask, were you immediately drawn to Haskell and Erlang, or was it a feeling that grew while working with them? Would you recommend working with Haskell or Erlang directly before trying out a language like Elixir, or should I go high level down?

Thanks


I did initial plunge into Haskell when I started using xmonad, looking at config file was visibly 'something else'. I would probably recommend starting with Haskell first -- if you want to properly blow your mind that's the way to go. All the principles are common so diving into Elixir took very little time afterwards. Some principles are getting their way into imperative languages and it is much easier to grasp them on pure functional level first. Understanding and using map, filter and reduce, in JS project, was much easier to grasp immediately because they borrow that logic from functional languages.

Elixir is beautiful but probably few notches easier to understand and write than Haskell. Reason I would start with Haskell is that it doesn't hide functional logic with syntactic sugar. For example variables in Elixir are not mutable but since you can assign to the variable already used in function, it can prevent programmer from understanding what immutable really means.


Before learning Elixir, I used functional-like functionality in C# (LINQ) and Javascript (particularly Rambda and Bacon.js) before learning Elixir, and I found that was plenty of preparation to understand Elixir. There's no need to start off with another functional language prior to learning Elixir.

I'm currently learning Elixir and writing about it so that anyone interested in Elixir can learn with me as I learn it. The goal is to help other learn Elixir as well.

I make some comparisons to features in C# and Javascript, and the occasional reference to other languages like Python, but you don't have to know any of those in order to benefit.

If you're interested, come check it out: https://inquisitivedeveloper.com/


In my case I found I was already starting to write Ruby in a very functional way (PORO which is like POJO, only setting properties at object instantiation, focusing on data expressed in built-in classes instead of custom classes, etc.) and that seemed to ease the transition quite a bit.

I've found that "immutability all the way down" has eliminated an entire class of bugs related to unexpected mutation, deadlocking/concurrency issues, etc.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: