Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Isn't there some kind of optional typing in Elixir?

What you're describing are the same uncertainties I've used to have writing PHP a long time ago, but since using optional types and PHPStan checker, it kind of serves as a compiler pass that raises those issues. The benefit being that I still can be lazy and not type out a program when I prototype the problem on my first pass.



>Isn't there some kind of optional typing in Elixir?

It’s in the works and recent versions of the compiler already catch some type errors at compile time, but it’s nothing remotely close to what you get from Typescript, or from any statically typed language like Go, Rust, Java, etc.


> Isn't there some kind of optional typing in Elixir?

Sort-of. Developers provide typespec which is like a hint and use dialyzer to find issues before runtime.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: