package access modifier?

Dan Smith daniel.smith at oracle.com
Mon Jan 14 11:36:40 PST 2013


See also the "Default method survey results" thread on the jsr335-eg at jcp.org and lambda-spec-experts lists from August/September of last year.

Two points in that thread:

1) Officially calling the accessibility you get with no modifier "package access" rather than "default access" is important to help avoid the confusion of "Does 'default' on this method refer to accessibility or inheritance?"  Introducing the 'package' keyword reinforces this terminology.

2) We concluded the thread without an in-depth discussion about the 'package' keyword for accessibility, setting that issue aside.  It would be fine to start a new thread in lambda-spec-experts.  (In fact, this is exactly the sort of thing that should be prompted by posts of updated specifications -- it seemed like a fairly noncontroversial change so we went ahead with it, but if someone wants to say, "hey, wait a minute...," that's great.)

—Dan


On Jan 14, 2013, at 11:02 AM, Brian Goetz <brian.goetz at oracle.com> wrote:

> Back at the last EG meeting, we discussed how in theory we would prefer to have a full set of accessibilities for interface methods, and that would require this little bit of syntax.  The lack of this little bit of syntax is also a persistent annoyance to some people.  However, since it is looking like even private methods may not make the train, this is certainly a dispensible feature for 8, and not doing it now does not foreclose on doing it later.
> 
> On Jan 14, 2013, at 12:22 AM, Remi Forax wrote:
> 
>> On 01/14/2013 09:19 AM, David Holmes wrote:
>>> I admit I haven't been able to keep up lately but I don't recall seeing any discussion of actually adding "package" as an access modifier, yet there it is.
>>> 
>>> David
>> 
>> I have seen that too, and I don't understand why it was introduced,
>> I remember we have discussed to add it to have a way to create package method in interface but since we rule out that.
>> 
>> Rémi
>> 
> 



More information about the lambda-libs-spec-experts mailing list