should protected imply package?

Don nospam at nospam.com
Fri Sep 25 00:44:34 PDT 2009


Andrei Alexandrescu wrote:
> In Java, "protected"-level protection implies package-level protection 
> (see e.g. 
> http://java.sun.com/docs/books/tutorial/java/javaOO/accesscontrol.html). 
> Should we copy that behavior in D, or take advantage of the package 
> keyword and require it as in "package protected"?
> 
> 
> Andrei

Java might be a good source of inspiration.

Sorting out what 'package' should mean is one of the big remaining 
issues in D. The current 'package' is a broken implementation of a 
broken concept. As in one of the bugzilla bugs "package does not work at 
all". But even if it did work as advertised, it would still suck.

Can we announce it as deprecated until we work out what to do with it? 
We should discourage everyone from using it right now, it's completely 
broken.



More information about the Digitalmars-d mailing list