News for hackers. Stuff that matters.
Re:The Unsound Playground: Java and Scala's Type Systems are... by olliej on Sunday November 27, 2016 @03:00PM (#13051113)
It really depends at what level -- because the erasure is done at the language level rather than the VM you _have_ to have a pile of runtime casts, even when those casts are no-ops :-/

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

Re:The Unsound Playground: Java and Scala's Type Systems are... by wtetzner on Monday November 28, 2016 @11:09AM (#13056276)
Well, that's a detail of how the VM works. My only point was that type erasure is not inherently bad, as plenty of languages do type erasure, like Haskell and OCaml. Of course you can always create conditions where it could become a problem.

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".

Re:The Unsound Playground: Java and Scala's Type Systems are... by pjmlp on Monday November 28, 2016 @05:32AM (#13054584)
> silly mid-90s java cpus

They are still quite actual, here is one example.

http://www.imsystech.com/products/im3910-ic/