r/functionalprogramming • • Aug 03 '24

Question What's the benefit of learning Elixir?

I'm currently learning Haskell (and F#), but I also look around to other languages.

One language that is often mentioned is Elixir. Do I have any benefit if I learn Elixir? It is dynamically typed, but I think strong static typing is a better choice to write more robust software. But maybe I'm wrong at this point and someone can clarify that for me.

47 Upvotes

45 comments sorted by

View all comments

Show parent comment

6

u/jasonpbecker Aug 03 '24

I would confidently answer this the same way as the post you’re replying to— you’ve developed a very strong opinion here without having actually tried something with different trade offs. A ton of the benefits you get from static typing you may find matter less or can be achieved other ways. Use Elixir with dialyzer and typespecs, learn idiomatic ways of using pattern matching and guards, and see where that takes you.

Writing Elixir is nothing like Python or C.

You keep repeating the same strongly held opinion about typing based on Python and C. I don’t really think you have the experience to hold such a strong opinion based on how you’re wiring it. And you’ll only learn the differences by building a meaningful project and trying it.

0

u/[deleted] Aug 17 '24

[removed] — view removed comment

2

u/jasonpbecker Aug 17 '24

I’m all for the effort going into gradual typing and look forward to seeing how far they can take it and what benefits it will bring.

There are a lot of people who don’t write Elixir who will tell you it’s non-viable because it’s dynamic. I’m saying being that dogmatic, especially coming from someone without a ton of experience (based on comparisons that aren’t really meaningful), can steer you wrong.

Sometimes things you think will matter a lot end up not. Sometimes things you don’t even think about or know about become deal breakers. I think it’s worth using something before having a strong opinion, and I think the OP comparing to C or Python suggests that static v dynamic is not the most important axis of comparison to know if Elixir will work for their problem space and how it’ll fit into their preferences.