3 ms·
Scala isn't the only alternative JVM language that has a superior generics implementation and that doesn't have primitives. What neither Scala nor those langua
by lukedegruchy 12y ago
Scala isn't the only alternative JVM language that has a superior generics implementation and that doesn't have primitives.
What neither Scala nor those languages have is support for value types (structs) at the JVM level. Generics over primitives and value types is a natural consequence of the introduction of value types to the JVM.
- pkinsky 12y agoScala supports value types now: http://docs.scala-lang.org/overviews/core/value-classes.html http://docs.scala-lang.org/overviews/core/value-classes.html
- hyperpape 12y agoThe document says that you can't actually always avoid the Object allocations, because of the JVM. I'm pretty sure you'll need VM changes in addition to language changes for this.