NetBeans support for proposed small language extensions
John Rose
John.Rose at Sun.COM
Thu Jan 22 14:44:39 PST 2009
Indeed. Invokedynamic is abusable in propotion to its power, and
someone could encode a whole foreign (or Java!) program in the method
name of a single ID call. The MOP will need to develop standards for
the syntax and design of those names; that's why I reserved the colon
':' char in the mangling proposal.
One could write this, I suppose, to denote a statically defined online
script, which the MOP would cause to be compiled at first execution
(i.e. call site link time).
Dynamic.#"javascript: print 'hello world'"();
There is an URL-like quality to such names. More conservatively, I
think we'll see names like #"get:length", #"set:parent",
#"super:init", #"op:%", and other cases where the invocation is not a
context insensitive named method call, but where there is an
additional intention/aspect in the surrounding syntax.
-- John (on my iPhone)
On Jan 22, 2009, at 9:46 AM, Attila Szegedi <szegedia at gmail.com> wrote:
> On 2009.01.22., at 10:14, Rémi Forax wrote:
>
>> With your RFE, @#"{}"({@#"@"()}) will be a valid annotation and
>> not a
>> swearword :)
>
> Well, it's probably a valid Perl program too, so why not allow it...
>
> Attila.
>
> _______________________________________________
> mlvm-dev mailing list
> mlvm-dev at openjdk.java.net
> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
More information about the mlvm-dev
mailing list