Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Status of Java exotic identifiers

Tags:

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?

like image 443
PiRocks Avatar asked Nov 05 '20 02:11

PiRocks


1 Answers

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

like image 120
Sean F Avatar answered Nov 04 '22 01:11

Sean F