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/Additional-Road3924 Jun 06 '26
While the idea is sound, in practice everyone would need to opt in to either the compiler plugin or some runtime mechanism to use this, which is a big no. Much like in kotlin this would need to be supported at language level for it to work properly, but I have a feeling that this would be as much of a mistake as shoehorning
varinto the language.