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
7
u/aboothe726 Jun 05 '26
Cool idea and practical. Do you need to configure javac, or does just adding the library run the relevant (I assume) annotation processor? Also, why the extra step of requiring users to provide their own annotation, which itself gets annotated with the @OptInRequired annotation? I suspect some users might prefer just to use @OptInRequired directly on their own classes/methods without the extra ceremony.