Motivation for type-level exports

Jesse Glick jesse.glick at oracle.com
Thu Nov 3 16:35:41 PDT 2011


Not an official response but my guess:

On 11/03/2011 06:20 PM, Neil Bartlett wrote:
> It seems that the only possible need for type-level exports could be
> one or both of the following:

3. To permit the type to be visible to other packages in the same module, but not to other modules. In my experience this is a rather common need. If only 
package-granularity exports are available, you can still get around this, but it is tricky, requiring a special trampoline [1]. A new access modifier intermediate between 
public and default would be more intuitive, I think.

[1] http://wiki.apidesign.org/wiki/FriendPackages



More information about the jigsaw-dev mailing list