What is a language construct? (was Re: Comment on state of Project Jigsaw)

Alex Buckley alex.buckley at oracle.com
Wed Dec 21 16:13:23 PST 2011


On 12/21/2011 3:57 PM, Neal Gafter wrote:
> On Wed, Dec 21, 2011 at 3:11 PM, Alex Buckley <alex.buckley at oracle.com
> <mailto:alex.buckley at oracle.com>> wrote:
>
>     I am still curious to know how Neal would integrate statements or
>     declarations into the Java language that determine the visibility of
>     types ("observability", in JLS terms) for code within the scope of
>     the statements or declarations.
>
>
> I recommend having the module system define a new form of accessibility,
> not "observability".  The JLS has many examples of language-defined
> accessibility.

Accessibility is a declaration-site mechanism. A provider (typically a 
type) defines its accessibility to the world. For the module system, we 
need a use-site mechanism, whereby a consumer (typically a module) 
defines its requirements on the rest of the world. Where do you say 
that? It clearly can't be up to a providing module to say all the places 
where it'll be observed/visible from.

Alex



More information about the jigsaw-dev mailing list