On Thu, 24 Sep 2009 23:36:46 +0400, Jarrett Billingsley <jarrett.billings...@gmail.com> wrote:

On Thu, Sep 24, 2009 at 1:38 PM, Andrei Alexandrescu
<seewebsiteforem...@erdani.org> 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.

Can't agree more!

Reply via email to