3 ms·
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 op
by hannofcart 3y ago
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?
- Dowwie 3y agoYes, and typespecs are worse to debug than anything the borrow checker may complain about in Rust. Public api does benefit by exposing them, though.
- plumeria 3y agoIf you want a type-safe language in the BEAM ecosystem, check out Gleam [0] [0] https://gleam.run/ https://gleam.run/
- mrjoelkemp 3y agoNot 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.
- lawn 3y agoMy 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.
- creakingstairs 3y agoYes 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.