Hacker News new | ask | show | jobs
by tiffanyh 1292 days ago
I thought Erlang lacked a type system.

How would this work since Elixir compiles into BEAM byte code (via Erlang Abstract Format)?

3 comments

Do you need to have static typing in your byte code for static typing at the language level to be useful?

I ask because the JVM lacks static typing[1] at byte code level but Java and Scala have it at the language level where it seems to be useful for correctness and performance.

1. https://wuciawe.github.io/jvm/2017/03/04/notes-on-jvm-byteco...

the compiler can type check source code for any obvious insanities, and thereby catch and prevent, at compile time, a subset of what would be runtime errors.

that's the idea anyway. (i worked on v8 for example, and other compilers, and typescript does something similar targeting javascript)

Sure but so does javascript, it doesn’t mean it can’t be added at compile time and add a lot of value.