Hacker News new | ask | show | jobs
by greenavocado 766 days ago
Elixir has a lot of promise on the surface but today I'm going to tell you why I am going to pivot my ten person company away from Elixir to a different language for two of our main customer facing services: typing and staffing. Elixir's typing situation is simply insufficient for complex real world use cases on teams with many developers and disparate services.

Elixir developers are also almost non-existent in the United States. It is far more productive and far less risky from a business perspective to hire someone that knows Python for the backend and is forced to work with mypy and pydanic using a major web framework.

The trope that functional programming leads to better code and is more maintainable is also a lie. Defect rate is just as high if not higher per module because of the typing problems.

1 comments

What typing does Python have available?
Enforcing use of mypy is good enough for all real world use cases

https://mypy.readthedocs.io/en/stable/index.html

As far as the lack of US Elixir developers, there is truth in that. It isn't that there are not Elixir developers, but that everyone who wants to work on Elixir is already working on Elixir.

Years ago, I knew this engineering manager whose strategy for recruiting Erlang developers wasn't to look for Erlang developers. He found generalists and polygots who would do well in any language, and were willing to learn Erlang, and recruited them, and then taught them Erlang. These are the kind of people who can take advantage of what Erlang/OTP (and Elixir) offers. They can do well with or without typing.

As for defects, the key isn't necessarily what's happening within a module, but how the various GenServer interact with each other. Having low defects within module boundaries are table stakes when working with Elixir. So if you're only measuring defects within module boundaries, you might miss the systemic problems related to interacting GenServers.

How is this different to typespecs and Dialyzer?
See the first reply to the question linked below. I have nothing more to add.

https://elixirforum.com/t/how-to-make-dialyzer-more-strict/1...

OK, great, then I'll add that pattern matching on struct types is built-in and good enough for my purposes.

Haven't used the LSP-server in a while, but I think it runs the Dialyzer-checking by default too, so that layer of checking will likely be there without adding project dependencies.