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

Per Bothner Per.Bothner at Sun.COM
Tue Sep 9 18:12:36 PDT 2008


Jonathan Gibbons wrote:
> I understand that the goal is to allow integration with other languages,
> but if they're all running on top of a JVM and the JVM spec does not allow
> these characters, then what is the point of allowing them at the Java
> level.

Other languages can *not* follow the JVM restrictions, so if the
JVM disallows certain characters, the compilers for those languages
have to mangle those characters into something the JVM can understand.
John in his blog posted a suggested standard mangling for those
characters.  It would be friendly if javac could implement that same
mangling, if it truly becomes a standard.  That way people using the
#"xxx" syntax don't have to learn the allowed/disallowed rules of the
JVM, and they don't have to mangle those names by hand.

Saying that you can use #"+" but not #"/" seems hard to justify.
-- 
	--Per Bothner
per.bothner at sun.com   per at bothner.com   http://per.bothner.com/



More information about the compiler-dev mailing list