Search code examples
javajava-8language-lawyerjava-7jls

Status of Java exotic identifiers


While looking at the Java invokedynamic documentation, I saw the following example of a Java feature called "exotic identifiers":

int #"strange variable name" = 42;
System.out.println(#"strange variable name");  // prints 42

I was unable to get this to work on an openjdk8 on my machine. Further googling found a few bug reports relating to this feature but not much else. Specifically this bug,and this other bug.

Yet another bug here suggests this feature was removed/never in jdk7.

Was this previously a Java feature that has since been removed, or was this never an official Java feature? And will this ever be added back?


Solution

  • That document you link was a proposal, an investigation, an enhancement request. This has never been adopted as an official feature of Java.