r/java • u/JustAGuyFromGermany • Dec 14 '25
Valhalla? Python? Withers? Lombok? - Ask the Architects at JavaOne'25
https://www.youtube.com/watch?v=tpnyamnEYbI
98
Upvotes
r/java • u/JustAGuyFromGermany • Dec 14 '25
View all comments
Show parent comment
4
u/cogman10 Dec 15 '25
I think there's just misalignment in the ecosystem which makes it not fit well.
The package and jar structure were built with the old classpath model in mind. Were the module system there from the start I don't think those would be the same.
The classpath system lets you put whatever class you want in whatever package you want in the jar. That'd likely be restricted. But also, I could see the jar/module name being the top level of the import. So you'd likely write something like
That alone removes a lot of the need for the module-info.java stuff. The other half that'd remove the rest would be an access modifier for modules. Something like:
The reason modules are hard, IMO, is because of the backwards compatibility requirements. That's why so few people write the module-info files.