NetBeans support for proposed small language extensions

Rémi Forax forax at univ-mlv.fr
Thu Jan 22 01:14:29 PST 2009


John Rose a écrit :
> On Jan 21, 2009, at 2:00 PM, Charles Oliver Nutter wrote:
>
>> I'm not sure there's a way to reconcile multiple proposed Java languages 
>>
>> changes that all want to use #.
>>
>
> The exotic identifiers proposal does not conflict with any use of hash 
> '#' (that I am aware of) as a separator or operator.  That's because 
> an exotic identifier is introduced by the two character sequence 
> hash-quote '#"'.  It interferes with other uses of hash '#' as much as 
> it interferes with other uses of quote '"':  That is, not at all.
ok, I understand, the symbol is #" and not #.
>
> On Jan 21, 2009, at 12:01 PM, Rémi Forax wrote:
>> I am not a big fan of the exotic identifier proposal mostly because
>> i doesn't understand the need
>
> As Charlie pointed out, along with the Dynamic.foo() syntax, exotic 
> identifiers allow Java to make direct calls to other languages.  E.g., 
> Dynamic.#"setcar!"(aCons, aValue) as well as Dynamic.list(aValue).
In that case, you don't need '#',  Dynamic."setcar!"(aCons, aValue)
is not ambiguous. It will work with all qualified access to field and 
method.
>
> A second point:  I know that annotations are the current state of the 
> art for assigning non-Java names to definitions.  But I think exotic 
> identifiers will provide, in many new cases, a smoother way to allow 
> Java to define names which are directly usable from non-Java languages.
>
>> and because using '#' creates conflicts
>> with several closure proposal (BGGA and CICE) and my modest
>> property proposal.
>
> See above.  For example, a proposed expression Author#name could be 
> harmlessly requoted as #"Author"##"name".  The example is 
> intentionally bad style, but there is no ambiguity.  At worst, an 
> operator "##" (is anybody suggesting one?) would be lexically 
> ambiguous if immediately followed by a string literal; the solution 
> (as with all such ambiguities) is to introduce a space to separate the 
> intended tokens.
I understand the need to call a method with an exotic identifier but not 
the need to introduce
a way to use exotic identifiers at any place in the Java language.
With your RFE,  @#"{}"({@#"@"()}) will be a valid annotation and not a 
swearword :)
>
> -- John
Rémi



More information about the mlvm-dev mailing list