4 ms·
Would you recommend Elixir for a first FP language? I am familiar with FP from using Python and JavaScript, but I have never used a completely functional langua
by fokinsean 11y ago
Would you recommend Elixir for a first FP language? I am familiar with FP from using Python and JavaScript, but I have never used a completely functional language yet. Can I dive into Elixir or should I learn something more "traditional" first such as Haskell, Lisp, etc?
- jimbokun 11y agoWith this book: https://pragprog.com/book/elixir/programming-elixir https://pragprog.com/book/elixir/programming-elixir I would say it's an outstanding choice to learn functional programming. The book is written for someone who knows an imperative language and wants to learn about functional programming.
- hackerboos 11y agoDave's book is a great read. I also recommend the Manning book "Elixir in Action" although I'm only half way into it.
- Xophmeister 11y agoMy current feeling [bearing in mind that it's been less than a week!] is that Elixir is to Haskell as Python is to C++. If you want to learn a dynamically typed FP language, then I think Elixir is a fine choice; especially from a JS/Python background, plus all the goodies that come with the Erlang VM. I've read it's also good for metaprogramming, so it ticks the same boxes as Lisp, without having to get used to S-expressions!... It's certainly something you can dive into :) Then, if you find you're really in to the FP Kool-Aid, I would definitely give Haskell (or OCaml) a try as well. It's a completely different ball game, but even as just a beginner -- I kinda-sorta-understand monads -- I would say that it's already improved my general programming skills.
- fokinsean 11y agoThanks for the suggestion, I will definitely be giving Elixir a try!
- yellowapple 11y agoI personally didn't understand FP at all until I played around with Erlang (specifically, the "Learn You Some Erlang" book). I reckon Elixir would be similarly enlightening (if not more; I feel like Elixir's macros are easier to wield than most Erlang equivalents, for example). The friendly, consistent syntax and the imperative-ish constructs in some places can work as a great stepping stone into the rest of the functional/declarative programming world.