traits getProtection

Timon Gehr timon.gehr at gmx.ch
Tue Apr 3 04:05:48 PDT 2012


On 04/03/2012 08:27 AM, deadalnix wrote:
> Le 03/04/2012 00:00, Timon Gehr a écrit :
>>
>> Making private symbols invisible to other modules or at least excluding
>> them from symbol clashes is necessary. The current behaviour is not
>> useful or desirable in any way.
>>
>
> This smells like religious coding to me.
>

Nope.

>>> NVI is perfectly possible with protected.
>>
>> Exactly. Furthermore, private implies final anyway.
>
> Which is complete bullshit.

It is a questionable design decision. It might be reasonable to allow 
overriding private members, but that would mess with the vtable layout.

> Even in a module you may want to override a
> method.

... which is excluded from the public interface. There are better ways 
to hide a method than to mark it private in an implementation class.


More information about the Digitalmars-d mailing list