在将 JSR/JEP 作为提案输入之前,是否有一种有意义的方式来收集反馈?

Is there a meaningful way of collecting feedback for a JSR/JEP before entering it as a proposal?

我打算启动 JEP/JSR 以将替代访问运算符引入 Java 语言规范。我已经确定了该提案的外观,现在我想收集对该提案的反馈(例如,如果我是第 999 个提出这件事的人)。我想在实际开始提案之前最好这样做。但是,似乎没有关于 openJDK 或 Java Community Process 的论坛或论坛。至少我找不到任何东西。不过我确实找到了一个#openjdk IRC 频道,但是除了有人进出,那里似乎没有任何交流。

如果我想以最少的 invasive/intrusive 方式将我的想法传达给其他人,我会选择什么方式?除了实际启动 JSR 并等待积极反馈之外,没有其他选择吗?

抛开实际问题,因为被问到的具体思路是什么:

The Java programming language allows the chaining of expressions in order to signify a flow of operations within a larger expression, and to ease access to 'deep' values.

String fieldText = tableProvider.getTable(tableKey).getRow(rowKey).getField(columnKey).text;

However, if the '.' accessor tries to access a nullary object, a NullPointerException is thrown, making any unchecked access risky. Even if the fallback for such a case is simply null or a static primitive value, a developer needs to handle every possible NullPointer-scenario explicitly. Alternatively they can generally catch the NullPointerException, which requires the returned value to be stored to a variable defined in a scope outside the try-catch block, so it can later be accessed outside the try-catch statement. However, this also catches NullPointerExceptions thrown within any accessed method, which might not be intended.

To avoid this, a new accessor is proposed, which aborts the resolution of a chained expression, in case the accessor would access a nullary object, and instead falls back to null, or a specified default value.

String fieldText = tableProvider.getTable(tableKey)°getRow(rowKey)°getField(columnKey)°text;

int i = tableProvider.getTable(tableKey)°getRow(rowKey)°getField(columnKey)°index ?: (-1);

In this example, if any of the invokes methods (getTable, getRow or getField) return null, the entire chained expression would terminate and return null (or -1), rather than throw a NullPointerException.

以上是我写的平淡 JEP/JSR 的动机部分。 ° 只是任何运算符的占位符,不会导致任意解释。实际草案还指定了一堆 目标,其中包括

  • Not having to handle null in places where null is not expected.
  • Deprecate NullPointerException.
  • Generally replace the '.' accessor.
  • Catch already thrown NullPointerExceptions.
  • Generally replace the Optional class in it's function as return type.

编辑: 看来我建议的概念已经是 kotlin(以及其他)的一部分,但包含两个功能:'safe navigation operator' 和 'elvis operator'。前者是我要重点说的

JEP 1 说:

It is expected [...] that the typical new proposal will start as an idea explored informally and shaken out within a specific Group, then drafted as a JEP for further review and comment, then endorsed by that Group's Lead and later the relevant Area Lead, and then submitted for acceptance by the OpenJDK Lead. Discussions along the way will usually take place in e-mail, but review meetings may be useful for particularly large or contentious proposals.

所以基本上这个想法应该由 e-mail 讨论(通常这意味着在邮件列表中)。对于各种主题,有一个 Java mailing lists 的大列表。也许您会在那里找到与您的提案相关的小组。

我认为大多数语言更改都是由 the compiler group 发起的,因此他们的邮件列表可能是一个很好的起点,可以作为获得关于在哪里讨论甚至在那里引发讨论的进一步指导的良好起点。