简体   繁体   English

Java 外来标识符的状态

[英]Status of Java exotic identifiers

While looking at the Java invokedynamic documentation , I saw the following example of a Java feature called "exotic identifiers":在查看 Java 调用动态文档时,我看到了以下 Java 特性示例,称为“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.我无法让它在我的机器上的 openjdk8 上工作。 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.这里的另一个错误表明此功能已在 jdk7 中删除/从未删除。

Was this previously a Java feature that has since been removed, or was this never an official Java feature?这是以前的 Java 功能,后来被删除了,还是从来没有正式的 Java 功能? And will this ever be added back?这会被添加回来吗?

That document you link was a proposal, an investigation, an enhancement request.你链接的那个文件是一个提案、一个调查、一个改进请求。 This has never been adopted as an official feature of Java.这从未被采纳为 Java 的官方特性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM