DIP22 - private symbol visibility

Steven Schveighoffer schveiguy at yahoo.com
Tue Jun 4 11:33:16 PDT 2013


On Tue, 04 Jun 2013 14:10:32 -0400, Max Samukha <maxsamukha at gmail.com>  
wrote:

> On Tuesday, 4 June 2013 at 17:39:05 UTC, Peter Alexander wrote:
>> http://wiki.dlang.org/DIP22
>
> "I'd also throw in getting rid of the "protected" access attribute  
> completely, as I've seen debate over that being a useless idea"
>
> How is that useless? Any non-trivial OOP code  
> (http://qt-project.org/doc/qt-4.8/qabstractitemview.html#protected-functions)  
> swarm with protected methods, and rightfully so. How would one restrict  
> access to members that are not part of public interface but should be  
> accessible to the derived classes?

Looking at the original comment here:  
http://forum.dlang.org/post/kb86il$1u9v$1@digitalmars.com

It looks like Jonathan raised the same point, but Walter never answered.

Since protected access is actually ESSENTIAL in OOP (at least, some form  
of virtual non-public function access, private is not virtual, so it would  
be disastrous to remove protected), I am wondering whether Walter really  
meant "package", as that has very little utility.

Care to answer, Walter?

-Steve


More information about the Digitalmars-d mailing list