Hacker News new | ask | show | jobs
by hopia 2338 days ago
I don't really agree that Elixir is a good intro to functional languages. It doesn't really teach you much about the functional paradigm as Elixir is fairly imperative by nature.

It focuses on practicality rather than adhering to the functional paradigm (lambda calculus etc.). That's probably the right choice for building highly concurrent industrial systems, but purely for learning about FP not quite as good as something like Elm would be.

1 comments

Isn't the fact that it isn't "pure" exactly what makes it a good introduction to the paradigm?
Here I thought that's exactly the fact that makes it less ideal for learning about the functional paradigm.

You also spend a considerable amount of time on Elixir learning how to architect fault tolerant concurrent systems. While useful, this doesn't have much to do with functional paradigm per se.

I find it approachable for someone that doesn't know FP. It doesn't require shifting all of your knowledge and habits at once. It might not teach you everything there is to know about FP but I think the question originally was roighly "is it hard to learn if you don't know FP?"

And I'd say for that type of case it may be more approachable for not being qiite so pure.

Approachable it certainly is, I'm not disputing that at all. The less functionally aligned a language is the more approachable it is to developers with little to no exposure to FP.

Personally, learning Elixir didn't really help me understand many fundamental FP concepts such as function composition & higher order functions, algebraic data types, referential transparency, functional purity, currying etc. It was only after spending time learning Elm and Haskell that many of these things dawned to me.

So I'd say if your aim is to really learn about the functional programming as a paradigm, there are better alternatives out there.