r/java • u/TheMrMilchmann • Jun 05 '26
Introducing opt-in requirements for Java APIs
https://osmerion.github.io/OptIn/blog/welcome
49
Upvotes
r/java • u/TheMrMilchmann • Jun 05 '26
View all comments
2
u/elmuerte Jun 05 '26
Another entry for the XKCD #927. Maybe at some point we'll get a real standard like JSpecify for null markers.
I do not have the luxury for using any kind of experimental stuff. But I do think we need better support for keeping track volatile and future breaking code.
I mostly skimmed the documentation. But I think I'm missing some things I think are important to convey. So lets say I am providing an experimental feature people can opt in. I need to communicate the maturity of this experimental feature. And I think I might also want to communicate that I am going to abandon this feature. Both of these would be separate items. Just because something became "beta" does not imply I will get rid of it, because it no longer fits. Although the abandonment could be a combination of an opt-in and Deprecated forRemoval=true annotation.