Skip to main content

Tal Weiss: Java 8: Compiling Lambda Expressions in The New Nashorn JS Engine

In a recent post I took a look at how Java 8 and Scala implemented Lambda expressions. As we know Java 8 is not only introducing improvements to the javac compiler, It’s also introducing a new one altogether – Nashorn. This new engine is meant to replace Java’s existing JavaScript interpreter Rhino. This is supposed to bring the JVM to the forefront when it comes to executing JavaScript at speed... I thought it would be a good time to bring Nashorn to the mix by taking a look under the hood, and see how it compiles Lambda expressions (especially compared to Java and Scala)...

Community: OpenJDK