by wtetzner · 10y ago · 0 comments
If there is no reflection, then it shouldn't be possible to observe whether or not type erasure is done.
I agree it works, i just don't think it's as elegant :D
Of course eventually everything is running on an untyped CPU and everything is just an integer so it's all erased in the end. Unless you have one of those silly mid-90s java cpus right?
Or maybe a LISP-machine
But the example with C# "doing it right" is a little odd in that case, since Microsoft had the opportunity to build something new, that didn't have the same issues the JVM had. And they did, in some ways, but that doesn't mean tracking type parameters at the VM level is the only way to do it "right".
They are still quite actual, here is one example.
Both Haskell and OCaml use type erasure, and I doubt anyone would claim they aren't functional languages.