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

Neal Gafter neal at gafter.com
Wed Dec 21 17:06:58 PST 2011


A use-site protection mechanism provides no protection, as one can just say
"yes, it's accessible to me" at any place you want to use the thing
supposedly protected.  But you do want the modularity mechanism to provide
a measure of protection, don't you?

On Wed, Dec 21, 2011 at 4:13 PM, Alex Buckley <alex.buckley at oracle.com>wrote:

> 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 <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