Fwd: JEPs proposed to target JDK 14: 345, 361, 363, 364, 365, & 367
Cay Horstmann
cay.horstmann at gmail.com
Mon Nov 4 12:47:39 UTC 2019
Since I just gave conference presentations urging more participation
with upcoming Java features, I feel I should comment here and urge
committers and reviewers to consider their position on JEP 361.
The switch syntax for what is commonly referred to as "match
expressions" has been designed and implemented as a preview feature. The
principal characteristic of the design is "orthogonality" of the axes
expression/statement and disjointness/fallthrough. It is claimed that
this aids learning, since programmers can reason from their existing
knowledge about switch statements. However, this orthogonality gives
rise to a match expression with fallthrough whose utility is
questionable, and it has been weakened with the introduction of the
"yield" statement. It is also not clear whether it matches programmer
expectations--see for example
https://mail.openjdk.java.net/pipermail/amber-spec-observers/2019-October/001844.html.
I am unaware of evidence gathered in the preview process that would
warrant moving the switch syntax out of preview at this point. Have the
three new forms of switch been adopted in meaningful ways? Have the
teachability claims been validated by analyzing teaching materials? Are
other languages successfully arriving at similar decisions? Has it been
shown in some other way that Java programmers can more successfully
reason about the four forms of switch, when compared to a non-switch
syntax for match expressions?
There is a risk in precipitously finalizing what may well become an
unloved feature, with negative impact for the reputation of both the
language and the process that drives its evolution. My suggestion is to
keep the switch syntax in preview until you can share evidence for its
success.
Cheers,
Cay
-------- Messaggio Inoltrato --------
Oggetto: JEPs proposed to target JDK 14: 345, 361, 363, 364, 365, & 367
Data: Thu, 31 Oct 2019 15:44:04 -0700
Mittente: mark.reinhold at oracle.com
A: jdk-dev at openjdk.java.net
The following JEPs are proposed to target JDK 14:
345: NUMA-Aware Memory Allocation for G1
http://openjdk.java.net/jeps/345
361: Switch Expressions (Standard)
http://openjdk.java.net/jeps/361
363: Remove the Concurrent Mark Sweep (CMS) Garbage Collector
http://openjdk.java.net/jeps/363
364: ZGC on macOS
http://openjdk.java.net/jeps/364
365: ZGC on Windows
http://openjdk.java.net/jeps/365
367: Remove the Pack200 Tools and API
http://openjdk.java.net/jeps/367
Feedback on these proposals from JDK Project Committers and Reviewers [1]
is more than welcome, as are reasoned objections. If no such objections
are raised by 23:00 UTC on Thursday, 7 November, or if they’re raised
and then satisfactorily answered, then per the JEP 2.0 process proposal
[2] I’ll target these JEPs to JDK 14.
- Mark
[1] https://openjdk.java.net/census#jdk
[2] https://cr.openjdk.java.net/~mr/jep/jep-2.0-02.html
More information about the amber-spec-observers
mailing list