JEP 276: Dynamic Linking of Language-Defined Object Models
blackdrag at gmx.org
Sun Oct 18 08:49:10 UTC 2015
On 17.10.2015 13:30, Martijn Verburg wrote:
> This looks very, very promising. Would it help to get the language
> maintainers of the most popular scripting/dynamic JVM languages involved
> ASAP? Happy to contact Groovy, Clojure, Scala, JRuby folks (although I
> suspect many of them are on this list).
still easy to miss something like this ;)
But I can give some comments for Groovy on this already. As I understand
it, this JEP is mostly for calls from Java on objects from other
languages. I have basically only main points:
* Invokedynamic (like invokeinterface and invokevirtual) does not like
calls with null as receiver, quitting the call right away with a NPE.
But languages may allow for calls on null. That again means some kind of
dummy receiver is required, if this is supposed to work. Then of course,
if you want to allow calls on null, every call would have to go through
the runtime in the end, thus I suspect this will be out of scope for
* Another part is the lookup of calls itself. To me the JEP is not fully
clear here. Sure, there is a service for this, but is every call
checked? That may slow down normal compilation for Java. The JEP speaks
of methods provided beyond what Java offers - but what about methods
replacing normal Java methods?
Btw, one part that would make me very happy, is an official API, that
allows some control of phases of the Java compiler as well as make
missing classes programatically known to the compiler without requiring
the java compiler to write those out as well. And that especially
because I assume that jigsaw will put all the api needed for this into
hiding by modules.
bye Jochen Theodorou
More information about the core-libs-dev