3 ms·
It seems like some of these issues with Java are out of date. Java has had a well-defined place for package-level documentation for close to 20 years, since 1.
by koreth1 4y ago
It seems like some of these issues with Java are out of date.
Java has had a well-defined place for package-level documentation for close to 20 years, since 1.5. It goes in package-info.java (docs: https://docs.oracle.com/javase/6/docs/technotes/tools/solaris/javadoc.html#packagecomment https://docs.oracle.com/javase/6/docs/technotes/tools/solari...).
As for documenting which classes are part of the public API, you've been able to make classes package-private since Java's initial release. The module system introduced in Java 9 in 2017 takes that further; you can explicitly control which classes are exported to consumers.
"Everything must be an object" is still more or less as true as it ever was, though.
- js8 4y agoThanks, wasn't aware of package-info. Yes, the module system is an improvement. Java is becoming more pragmatic as the ideological dominance of OOP is dying out.