3 ms·
No worries! For what is worth, I was not considering Dialyzer as part of my reply. You should be getting many warnings related to typos from the compiler! Any
by josevalim 3y ago
No worries!
For what is worth, I was not considering Dialyzer as part of my reply. You should be getting many warnings related to typos from the compiler!
Anyway I agree with the sentiment: we have a high ceiling but we are currently far away from it. If we had a Dialyzer that runs all the time, is fast (Erlang/OTP 26 already improved here), and has good error messages, it would already be great.
We are currently researching a proper type system into the language. Fully integrating and improving the Dialyzer experience would be our plan B.
- skrebbel 3y agoWow that would be great! I recall reading that an effort some years ago to do a type system on top of Erlang failed because typechecking inter process communication got too messy (or slow). Personally, I feel like a type system that leaves message passing completely out of scope would solve so many problems already. And then people can invent typechecked GenServers and the likes in userland. I mean when 2 NodeJS processes communicate via JSON over HTTP then those aren’t typechecked either, even if their codebases are all TypeScript. Except, of course, when using the same TS rpc lib on both sides of an interface, with some code sharing between them so they use the same types. I feel like even when all typechecking happens only on regular static synchronous function calls, and message passing is left out of scope, it’ll be so extremely useful. And like you said, the low amounts of dynamic dispatch makes it tractable. Still a huge amount of work I bet though :-)