What's the problem that "superpackages" tries to solve?
Is very easy to "hide" private packages: just tell in the documentation that they are not intended to be use directly (for example com.sun.* packages in the JDK).
Developers are not stupid.
Superpackages adds an unnecessary complexity, because now you have to maintain:
- the XML for the build (maven, ant or whatever)
- the XMLs of your favorite framework
- the annotations of another framework
- the specific deployment descriptor for your application server
- ... and now the superpackages files!!
(plus add the complexity to the tools: the IDE now have to assist you with the "visibility" of classes in superpackages)
This is a nightmare!
Instead of "superpackages", what Java needs is the concept of "libraries". (like "libraries" in eclipse).
Now if you want to use a framework that has many .jars you have to worry to put each one (with the correct version) in the classpath... is a headache.
People at Sun and the OpenJDK: "Ponganse media pila!" |