2 ms·
There's plenty of material out there but I'll summarize: 1. Erasure keeps you honest and prevents you from second guessing the compiler by limiting the introsp
by hota_mazi 8y ago
There's plenty of material out there but I'll summarize:
1. Erasure keeps you honest and prevents you from second guessing the compiler by limiting the introspection you can perform on your code.
2. Reification puts up a very high barrier to interop. Erasure systems are much more welcoming to implementing multiple languages and multiple type systems on top of them. For example, the scala.net project was abandoned because it was impossible to represent Scala's type system on .net's reified platform.
3. Reification imposes overhead because of the multitude of extra runtime checks that need to be performed.
4. Most the benefits you get from reification can be emulated on erased systems (some are admittedly more hackish on an erased runtime, but they should be rare).
- phillipcarter 8y agoI suppose if implemented flawlessly, this would be true: > Erasure keeps you honest and prevents you from second guessing the compiler by limiting the introspection you can perform on your code But the title of the article under discussion is called "The Java type system is broken", after all :)