On Thu, Sep 24, 2009 at 1:38 PM, Andrei Alexandrescu
<[email protected]> 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"?

Under the current implementation, if protected implied package, all
protected methods would suddenly become nonvirtual, since for some
reason, package is treated as a kind of 'private'. Not really what
you'd want, I think ;)

'package' should not conflate visibility and virtuality. If it didn't
do that, having protected imply package would be just fine.

Reply via email to