Live data from Hacker News

Ask HN: Are you satisfied with Elixir or do you regret choosing Elixir?

news.ycombinator.com

1–10 of 297 posts

Ask HN: Are you satisfied with Elixir or do you regret choosing Elixir?

#1
I'll be starting to work on a new project from next month and I've been reading all but good news about Elixir. I have talked to people in real life, most of the devs had positive things to say about it. Does anyone have any arguments against selecting Elixir? Question coming from RoR developer.

Re: Ask HN: Are you satisfied with Elixir or do you regret choosing Elixir?

#5
I'm a Rails developer and have often wanted to try out Elixir but haven't found a compelling reason (or perhaps, project) to do so yet. Maybe I'll take the plunge and write my next app in it... Maybe get stuck in and try it on your next project too? I'd be interested to hear what you think as we're in similar positions I think.

Re: Ask HN: Are you satisfied with Elixir or do you regret choosing Elixir?

#8
post #2

If you are a RoR dev, Elixir will feel like a breeze. As someone who does Haskell in their day job, I miss static, powerful type-systems. That being said, the ecosystem is wonderful. Plug, Phoenix and Ecto are exceptional libraries!!

Interesting to see someone work in Haskell professionally. Jobs in Haskell don't seem be plenty atleast in my area. Could I know what do you work on, and what was the process of obtaining a job there?

Re: Ask HN: Are you satisfied with Elixir or do you regret choosing Elixir?

#9
It's not argument "against" selecting it (it's a free world, and mileage vary), but a couple of scar-earned advice:

- Be careful about libraries. If you know that your system has to interact with X, don't assume that there is a running, idiomatic, maintained libary for X on `hex.pm`. Do a bit of due diligence. We had experience ranging from `meeh` (oauth2, graphql, http) to `pretty bad` (mqtt, swagger.)

But as other say, if you're doing vanilla Phoenix/Plug/Ecto with exactly the right kind of DB, you'll should be ok.

- Give a little though about how you'll be deploying and operating. `releases` and `configuration` haved changed in pretty big ways in the past (https://elixir-lang.org/blog/2019/06/24/elixir-v1-9-0-releas...), the ecosystem is constantly in flux (`config.exs` vs `Application.get_env` vs ENV_VAR vs..) . Plus, the erlang virtual machine (BEAM) has knobs that are not always easy to play with. And if you hide it behind, say, docker containers, you'll have other troubles. Don't expect an `heroku do-some-magic` experience.

- Unless you're familiar with the Actor Model already, and your application is very simple, expect a learning curve made of:

  1. A period where you're afraid of GenServer and fail to do anything because you don't want to create a supervision tree
  2. A period where you think you've understood GenServers and you create GenServers like crazy
  3. A sobering period where you don't understand anything about your application
  4. A couple of refactorings where you move the pendulum until you reach something that's acceptable
- Finally, you're coming from RoR, so you're probably fine with not having static types anyway ; may St Isidore help you ;) There is a thing called `dialyxir`. It might help a bit ; It will disappoint a lot.

Re: Ask HN: Are you satisfied with Elixir or do you regret choosing Elixir?

#10
If you invest time learning Erlang everything around Elixir will make sense and it will be a pleasant experience not only to "write" but to test, debug and maintain as well. I would go through this slightly dated but gentle introduction before learning Elixir: https://learnyousomeerlang.com/content

Thinking in processes and knowing/using the GenServer abstraction is the core of Elixir programming.

So, one negative is that difficult to use without Erlang knowledge. Also some good libraries are Erlang only for compatibility/historical reasons.

Post reply on HN