Compatibility between Scala closures and Java 8 closures -


After reading some Open ZKK mailing list, it seems that Oracle developers are currently throwing things out of the proposal to shut down, because the first design passes through the introduction of Java in Java.

Given that Scala closures are more powerful than schematic closure for Java 8, I wonder if this would be possible for E. G. Call to stop Java method from Scala, define one stop in Java and give it to Scala function etc.

Will the Java Closer be displayed in a bytecode or in a different way as its scale counterparts? Would it be possible to close the gap between the functionality of Java / Scala Closer? Note: 5 years later, this increase was included:

Scala 2.12 emits closures in the same style as Java 8 .

The compiler for each lambda generates a method containing lambda body. - On the runtime, this method has been passed as a logic for the longmetaphateriner provided by JDK, which creates a closure object.

Compared to Scala 2.11, the advantage of the new plan is that the compiler does not produce an anonymous class for each lambda. It leads to significantly smaller JAR files.


Comments