PROPOSAL: language support for JSR 292
John Rose
John.Rose at Sun.COM
Fri May 1 13:09:36 PDT 2009
On Apr 30, 2009, at 12:07 PM, Rémi Forax wrote:
> The first question is what is the goal of such construct.
The goal is preserving the utility of Java as a system programming
language for the JVM, given changes in the bytecode architecture.
>
> If the goal is to be able to call any dynamic languages from Java,
> this is in my opinion a nice dream but that means
> mixing different language semantics.
>
> If the goal is to help dynamic language developers,
> the question is why a language developer code in Java
> and not in its own language.
Very few languages are completely self-hosting. Most have lots of
systems-level code in them (C or assembly, in the non-Java world.)
It's reasonable to ask the systems programming language to provide
some access to the capabilities of the underlying machine. Note how
useful asm statements are in C for system building. (The present
proposal is a much smaller and better-structured loophole than asm, of
course.)
> If the goal is to simplify reflection or dynamic invocation
> in Java, the dynamic type of C# is what we want.
I agree, but let's do one thing at a time. This is support for the
system programmers, not language mixing for application programmers.
For example, I am using polymorphic method handle invocation all the
time in the JSR 292 system support code. Having Java support me there
saves me from having to drop down into bytecode weaving or (worse)
changing the C++ code of the JVM.
-- John
More information about the coin-dev
mailing list