www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - a more fine access model?

reply icee <icee_member pathlink.com> writes:
D's access control maybe too simplified.
e.g if i need a member accessed by both subclass and package members, (package
protected foo?).
Jun 06 2006
parent Mike Capp <mike.capp gmail.com> writes:
In article <e65t57$2osj$1 digitaldaemon.com>, icee says...
D's access control maybe too simplified.
e.g if i need a member accessed by both subclass and package members, (package
protected foo?).

C# has a "protected internal" access which does exactly this, but in ~3 years of writing C# I've never felt the urge to use it. If it's just an odd one-off case, I'd suggest using a 'protected' member and a 'package' getter property, or vice versa, rather than cluttering up the language. cheers Mike
Jun 07 2006