Improving the JVM for Scala [closed]

Basically, everything that John Rose has been campaigning for 🙂

  • Fixnums – To eliminate the cost of boxing/unboxing primitives.

  • Method Handles – Would speed up higher-order functions and allow the JVM to optimise them more effectively. SAM types can sometimes require an awkward flip/flopping between monomorphic and megamorphic call sites that prevents inlining.

  • Continuations – To support asynchronous/concurrent design, as per node.js

  • Interface Injection – Simplify mixin composition and the implementation of roles, as well as eliminating the need for generating some intermediate classes and making structural types possible without reflection in many cases.

  • Tail-call optimisation – Should be a no-brainer 🙂

Reification is often quoted as something that would benefit Scala’s pattern matching, but this would come at a high cost in terms of interop, given the different variance schemes that the two languages use. At this point, I believe that reification may actually cause more harm than it would do good.

I also think it unreasonable to expect anything that would break backwards compatibility in Java. That just ain’t gonna happen.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)