Hacker News new | ask | show | jobs
by thomasfedb 2338 days ago
Asking for "the advantage" is probably not quite the right question. Different toolbox, different tools, for different solutions to different jobs. Elixir runs on the Erlang VM, is functional, has a Ruby-like syntax.
1 comments

How easy (or hard) is it to learn Elixir for someone with Python/PHP/JS background and zero knowledge of functional programming? Also, are there job opportunities for Elixir or is it a niche language?
As far as functional programming languages go, I think Elixir is probably one of the best intros: especially for someone coming from another dynamically typed language like Python or PHP. The syntax will be far less foreign than a language like Lisp or Haskell. You won't have to deal with types (though they are neat to learn, too).

Elixir is not quite as popular as Go. But there are absolutely job opportunities out there. And huge projects currently using it (e.g., Discord). I wouldn't focus on needing there to be a job market to learn something new, though. You'll learn techniques and a new way of problem solving that will make you a better Python, JS, and PHP programmer, even if you never professionally work as an Elixir developer.

The Introduction guide on the Elixir website is a really good place to get started. You should be able to pick up the basics pretty quickly: https://elixir-lang.org/getting-started/introduction.html

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.

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.

Easy enough, for me. I have roughly the same history of languages. Functional programming as a paradigm was the biggest hurdle for me. But Elixir guide docs help yout quite a bit there.

Job opportunities are fine, not Python+ML or JS+React great but there is work out there.

It can kick your butt at first but once it click it's really fun.

Job opportunities seem tied to doing RoR as well, but I guess that's less and less true.