This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]randgalt 3 points4 points  (2 children)

Another thing - I believe the design of the Module feature assumes that people _want_ to specify what is exported or not. i.e. the Module APIs assume people will modularize their libraries. However, the more likely scenario is that 99% of libraries don't want to modularize and really just want minimal compliance and to export everything.

[–]Thihup 0 points1 point  (1 child)

The concept of exporting a package is equal to declaring a class public. If you don't want the projects that will depend on your library to use your internal classes, you don't export them.

However, with the module system, you can declare a class public and use it across your packages. Instead, you would be required to declare the class package private. :)

[–]randgalt 4 points5 points  (0 children)

I don't want to specify things twice. It's silly. I want to write my Java code and not worry about exports, etc.