r/java • • 16d 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.

92 Upvotes

36 comments sorted by

View all comments

Show parent comment

3

u/TheStrangeDarkOne 11d ago

Thank you for the personal reply Brian! I've actually been an avid reader of the mail archivies and I'd like to take this opportunity to say that I always found your nuanced takes quite inspiring.

Among others, I remember when you brought up the topic of "tearable value types" and the "violation of cross-field constraints" with the subsequent creation of the 4 value-buckets. There was much resistance at what seemed like a minor annoyance at first but it lead to a stronger design overall.

Personally, I'm really excited about the way value types have shaped out in the same way "Functional Interfaces" are a more interesting takes on "function pointers".

Thank you for your dedicated stewardship of the language!
I'd like to hope that some of it will be reused in languages of the future to come.