PROPOSAL: language support for JSR 292
howard.lovatt at iee.org
Sun May 3 22:53:08 PDT 2009
2009/5/2 John Rose <John.Rose at sun.com>:
>> At a higher level, rather than details of the proposal, it would be a
>> nice addition to have a convenience interface, lets for the sake of
>> argument call it Dynamic, that behaved like a top level class in a
>> dynamic language and you implicitly had to define a private static
>> missingMethod method in any class that implemented Dynamic.
> Interesting. There are lots of degrees of freedom in integrating static
> Java with dynamic languages. The present proposal is intended to be
> minimal, but there is lots to dream about here for the future.
>> Then a
>> class that implemented Dynamic or any class that used an object of
>> type Dynamic would be converted automatically be the compiler to use
>> InvokeDynamic, e.g. your simple example would become:
> So Main would inherit the ability to form invokedynamic calls from Dynamic.
> I think that would make many (not all) Java programmers feel very insecure
> about the meaning of the code in such a scope.
To me it would be great to have a mixture of static typing and dynamic
typing in the language. I would mainly use static typing, but at times
dynamic typing is very useful (e.g. Rails makes methods on demand).
Some languages have optional typing; Gilad Bracha proposed it for
Newspeak (bracha.org/pluggable-types.pdf) and Fan
(http://www.fandev.org/) does static and dynamic on the JVM.
> My hope right now is to lay down a good enough foundation to enable us to
> play with such things in Java 7.
I will be playing with your mlvm and will try a few of these things out.
More information about the coin-dev