www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - protected package

I suggested that "protected package" be treated as a separate protection, so
that access is given to derived classes and other modules in the package. It
wasn't picked up. I can imagine it complicates things. How about having
"protected" include package access automatically?:

class Foo
{
   private int a; // Access in Foo and this module.
   package int b; // Access in Foo and this package.
   protected int b; // Access in Foo, derived from Foo, and this package.
}
Jul 15 2004