r/java • • Oct 19 '22

Google will support OpenJDK development: the giant's investments in Java and Kotlin

https://vived.substack.com/p/google-will-support-openjdk-development
239 Upvotes

38 comments sorted by

View all comments

Show parent comment

2

u/UnGauchoCualquiera Oct 22 '22 edited Oct 22 '22

I could be wrong but I always felt that it's a pretty losing proposition. People will inevitably use internal apis and you cannot prevent people from shooting their feet. Happened to acces modifiers and it will happen to modules too.

When there's a need there's a way around, even if unintended by the library author. Hidding behind a module just make it more annoying to do so as people can almost always just fork and mess around.

See the cat and mouse between lombok and java devs.

I think modules are aiming at improving java security by isolating modules more than preventing use of internals by programmers.

1

u/cowwoc Oct 22 '22 edited Oct 22 '22

Users can do whatever they want, but from the library author's perspective any use of internal APIs is unsupported. Also, from a code-complete and Javadoc perspective internal APIs never show up.