TypeScript, but for Elixir?

I don’t often need super complex typing in elixir, but on occasion I find myself writing something complex enough that a type system could really aid. It would be cool if I could just put a different extension on the file like .gl and have mix just compile the file with gleam. It all compiles to beam and so it should all work, right?

As a long-term Typescript developer, I can tell you that working with Elixir (and also Gleam) feels like going back to the stone age of programming. I’m only pursuing this path because the BEAM has great potential + Phoenix is easy to understand and LiveView could be a game-changer for many applications (and cannot easily be reproduced in other systems).

Modern IDEs understand every single bit of your Typescript code, so you can refactor/rename any variable, function, or module and all references (throughout your whole codebase) are automatically adjusted + you get immediate feedback and IntelliSense (type hints) while you are writing your code.

The JS/TS world is even one step further with tools like Wallaby.js that allow real-time test feedback right in your IDE while you are typing (so you don’t even need to have a separate test watcher running anymore)

So IMO the “soundness” of a type system is in practice much less important than the refactoring and productivity gains (or general DX) of an environment that understands your code and helps you navigate huge codebases.

1 Like

This can be done with Elixir as well. But it has to be done. I guess PR are welcome in the Elixir-LS repository !

1 Like

They are not at odds, and are not mutually exclusive. Rust and OCaml have pretty strong typing systems and their LSP server implementations make them excellent for the IDE experience you’re referring to.

2 Likes