Java 语言规范第三版勘误表

发布于 2024-08-29 03:38:06 字数 530 浏览 3 评论 0原文

我广泛使用 JLS 作为学习和教学资源,但我注意到其中存在一些错误。

有一些简单的拼写错误(例如 JLS 5.1.4 “转换”),但也有一些我认为非常严重的错误。

例如,JLS 18.1 Java 编程语言语法 应该是Java语言语法的权威参考,但它包含了一条从未被使用过的产生式规则! (例如MoreStatementExpressions)。这肯定是给定语法其他部分存在更严重错误的迹象,对吧?

那么第三版有勘误表吗?会有吗?我们是否应该将发现的错误发送给 Sun/Oracle?会有第四版吗?

I use JLS extensively both as a learning and teaching resource, but I've noticed that there are some errors in it.

There's the simple typos (e.g. JLS 5.1.4 "convesions"), but there's also some that I consider quite serious errors.

For example, JLS 18.1 The Grammar of the Java Programming Language is supposed to be the authoritative reference for the grammar of the Java language, but it contains a production rule that never gets used! (e.g. MoreStatementExpressions). Surely this is a sign of more serious errors in other parts of the given grammar, right?

So is there an errata for the 3rd edition? Will there ever be? Should we send errors we've found to Sun/Oracle? Will there ever be a 4th edition?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

静若繁花 2024-09-05 03:38:06

我能找到的最好的是 "JSR 901 的维护审查 (Java (tm) Java SE 7 语言规范”


然而,OP所关心的问题并不严重......

这肯定是给定语法其他部分存在更严重错误的迹象,对吗?

对此我会说“错误”。未使用的作品只不过是印刷/编辑错误。它与Java语法的含义没有区别。


FWIW:Oracle 的 JLS 主页 没有提及 JSR 901 修订工作(其中有显然已经完成了!)并且提供 JLS 反馈的链接已损坏。

The best I can find is the "Maintenance Review of JSR 901 (Java(tm) Language Specification) for Java SE 7".


However, the problems that the OP is concerned about are hardly serious ...

Surely this is a sign of more serious errors in other parts of the given grammar, right?

I'd say "Wrong" on this. An unused production is little more than a typographical / editing error. It makes no difference to the meaning of the Java grammar.


FWIW: Oracle's main JLS page has no mention of the JSR 901 revision effort (which has apparently finished!) and that the link for providing feedback on the JLS is broken.

皓月长歌 2024-09-05 03:38:06

我也被 JLS 第 18 章的语法问题所困扰,并且
JLS 中其他地方的问题。尽管很多 Java 程序员可能不知道
受到它们的影响,当你构建一个
编译器或程序分析工具。

JLS 的许多问题已在最新版本中得到修复
JLS(“JLS,Java SE 版本”或非正式的“JLS 第 4 版”)。
特别是第18章(Java语法)已经完全
进行了修订和重组。

您可以在 Java SE 规范下载页面 (直接链接到 JLS
PDF
)。

2012 年 2 月 18 日更新:
https://blogs.oracle.com/abuckley/en_US/entry/jls7_and_jvms7_online< 中所述/a>,Java 语言的 Java SE 7 版本
规范和 JVM 规范现已提供:
PDF 和 HTML 格式的
http://docs.oracle.com/javase/specs/

I have also been burned by problems with the grammar in JLS chapter 18, and
by problems elsewhere in the JLS. Although many Java programmers may not
be affected by them, these are not trivial problems when you are building a
compiler or program analysis tool.

Many of the problems with the JLS have been fixed in the latest version of
the JLS ("JLS, Java SE edition" or, informally, "JLS 4th edition").
In particular, chapter 18 (the Java grammar) has been completely
revised and reorganized.

You can find the latest JLS at the Java SE Specifications download page (direct link to JLS
PDF
).

UPDATE Feb 18, 2012:
As described at https://blogs.oracle.com/abuckley/en_US/entry/jls7_and_jvms7_online, the Java SE 7 Editions of the Java Language
Specification and the JVM Specification are now available at
http://docs.oracle.com/javase/specs/ in both PDF and HTML form.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文