Re:How to Sell Elixir Again (2023)
by hannofcart on Saturday May 13, 2023 @03:49PM
(#35932029)
Question for anyone who has switched to Elixir from a typesafe language: doesn't the lack of complile time type checking bother people working on Elixir? Any opinions on that?
[ Parent
| on HN ]
If you want a type-safe language in the BEAM ecosystem, check out Gleam [0]
Re:How to Sell Elixir Again (2023)
by mrjoelkemp on Saturday May 13, 2023 @07:01PM
(#35933641)
Not really. Working on a 2+ year, large, monolithic phoenix liveview app at Spotify. VS Code runs dialyzer on file save, which shows type mismatches. I also run dialyzer on pre-commit for a sweeping check. Ideally, we'd have the same optional typing flexibility with a compile time check, but it seems like a marginal gain over the current setup.
My favorite languages are Rust and Elixir, and yes the lack of static types is my one gripe with Elixir.
It's a little bit better than what it might look like on the surface level as you do a lot of pattern matching and dialyzer. It's far from what you get from Rust of course, but it's better than with Python for instance.
Re:How to Sell Elixir Again (2023)
by creakingstairs on Saturday May 13, 2023 @08:45PM
(#35934288)
Yes it is the only thing that really bothers me about Elixir. In my personal projects, I heavily utilise typespecs which makes it somewhat bearable. But in my previous day job that had a high turnover rate (and hence a huge mess) doing any refactoring on the Elixir codebase was a nightmare even with tests.
I found maintaining the Typescript codebase in the same company much easier.