Replacing # with backticks for exotic identifiers
John.Rose at Sun.COM
Thu Apr 22 12:39:23 PDT 2010
I was updating the Project Coin proposal to take invokeGeneric into account, and added some paragraphs of rationale about the ugly #"exotic identifier" syntax, since that decision sometimes gets comments.
In this case, ugly is better than pretty because anything pretty is going to pre-empt a more worthy use of the pretty syntax.
BTW, there is now a patch in the mlvm repository which implements a prototype for method handle literals in the FCM style. This demonstrates (though there was no credible doubt before) that there is no ambiguity among the various proposed lexical uses of '#'. Using '#' in two different tokens is just as safe and clear as using the characters '/' '*' 'x' 'e' for various tokens.
On Nov 27, 2009, at 3:20 PM, Paul Benedict wrote:
> I didn't initiate this suggestion, but I am passing it along because
> it is really good, imo. Furthermore, I've complained about the #""
> syntax and, well, I still complain about it :-)
> Artur Biesiadowski, in the Coin Dev mailing list, made the suggestion
> to replace the #"" notation with backticks . I think his suggestion
> was great for at least four reasons:
> 1) Closures might use pound symbol
> 2) Method literals might use pound symbol
> 3) JavaDoc already uses pound symbol
> 4) Backticks are commonly supported by several RDMS to represent
> exotic identifiers (like table names with spaces).
> Is the pound symbol really the choice favorite by the participants in
> this list? John and Remi, unless your heart is set on it, can you
> consider a change with regards to all the other language changes now
> going to happen?
>  http://mail.openjdk.java.net/pipermail/coin-dev/2009-November/002556.html
> mlvm-dev mailing list
> mlvm-dev at openjdk.java.net
More information about the mlvm-dev