1 6746458: writing libraries in Java for non-Java languages requires support for exotic identifiers
2 Summary: token syntax (currently non-standard) for introducing exotic identifiers
4 javac needs to support library development for non-Java langauges
6 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6746458
9 - hash mark followed immediately by string literal creates an identifier of the given spelling
10 - no other processing or interpretation is given to the identifier
11 - #"foo" is indistinguishable from foo, if foo is a normal, non-keyword identifier
12 - rejects exotic identifiers which may run into JVM limitations
13 - rejects empty string and any string with one of "/.;<>["
14 - user must mangle invalid symbols; see http://blogs.sun.com/jrose/entry/symbolic_freedom_in_the_vm
16 Examples from the unit test:
18 String #"555-1212"() { return "[*86.555-1212]"; }
20 class #"int" extends Number {
25 static #"int" valueOf(int #"int") {
26 return new #"int"(#"int");
28 public int intValue() { return #"int"; }
29 public long longValue() { return #"int"; }
30 public float floatValue() { return #"int"; }
31 public double doubleValue() { return #"int"; }
32 public String toString() { return String.valueOf(#"int"); }
39 - unit tests test/tools/javac/quid/*
42 This does not require a full JDK build.
47 $ ./dist/bootstrap/bin/javac -d dist test/tools/javac/quid/QuotedIdent.java
48 $ java -version # should print 1.6 or later
49 $ java -cp dist quid.QuotedIdent # should print OK
50 $ ./dist/bootstrap/bin/javac -d dist -cp dist test/tools/javac/quid/QuotedIdent2.java
51 $ java -cp dist quid.QuotedIdent2 # should print OK