Why has base class protection been deprecated?

David Bryant bagnose at gmail.com
Tue Apr 24 07:17:33 PDT 2012


On 04/24/2012 11:07 PM, Don Clugston wrote:
> On 24/04/12 15:29, David Bryant wrote:
>>>
>>> Because it doesn't make sense. All classes are derived from Object. That
>>> _has_ to be public, otherwise things like == wouldn't work.
>>>
>>
>> Does the same apply for interfaces? I'm specifically implementing an
>> interface with non-public visibility. This shouldn't affect the
>> visibility of the implicit Object base-class.
>
> Right. Only classes are affected.

Ok...so I still don't understand why the original example shouldn't 
compile. I'm not trying to change the visibility of the base class but 
rather the visibility of the interface.


More information about the Digitalmars-d-learn mailing list