[patch] 6746458 support for exotic identifiers (identifier superquote)

Jonathan Gibbons Jonathan.Gibbons at Sun.COM
Tue Sep 9 16:19:31 PDT 2008


Since the characters are illegal at the JVM level, what's the reason for 
allowing them?

-- Jon


Per Bothner wrote:
> John Rose wrote:
>> The javac frontend should accept any quoted string immediately 
>> following '#' (with no intervening space), interpreting normal string 
>> escape sequences, and taking the resulting string exactly as the 
>> spelling of a normal identifier.  Keywords like 'int' should not be 
>> recognized.  Strings which risk being illegal at the JVM level must 
>> be rejectedi immediately; this simply means rejecting the empty 
>> string and strings which contain any of the characters "/.;<>[".
>
> I would expect the compiler just "mangle" those characters, as
> discussed in your blog.  Essentially, you're requiring people
> to mangle such string by hand.  What's the reason for that?




More information about the compiler-dev mailing list