r/java • • 23d ago

Withdrawing the Primitive Patterns preview feature in JDK 28

https://mail.openjdk.org/archives/list/amber-spec-experts@openjdk.org/thread/UYEK3PGOHN6R56AHJTSLPGAY363K666S/

Primitive Types in Patterns will be removed in JDK 28 and will no longer be available in that release.

The Valhalla project has been exploring a new vision for Java numerics, including the possibility of user-defined numeric types. New kinds of numeric types would need to support exact numeric conversion, and vice versa. Given that the Valhalla work is still evolving, it would be premature to finalize Primitive Types in Patterns with their current definition of exact numeric conversion.

94 Upvotes

36 comments sorted by

View all comments

1

u/speakjava 17d ago

Sadly, this removes a lot of material from my "Modern Java Puzzlers" session 😀.

4

u/brian_goetz 16d ago edited 16d ago

Good, you should remove all the material from your Puzzlers talks! Unless you are Josh and Neal (sorry, I have bad news for you), Puzzlers talks almost always seem more clever and educational to the speaker than to the audience, and invariably cast the platform in a worse light as the examples are routinely propagated separate from the ideally-educational context they originally came with.

(See https://mail.openjdk.org/archives/list/amber-dev@openjdk.org/message/DTKZFWGUIKC5HEGWZ7V3XTABDTJ6E33A/ for more details.)

1

u/Anbu_S 17d ago

HaHa