Why do private member variables behaved like protected in the same module when creating deriving class?

Atila Neves atila.neves at gmail.com
Thu Nov 1 14:29:32 UTC 2018


On Wednesday, 31 October 2018 at 20:46:05 UTC, Zot wrote:
> On Monday, 29 October 2018 at 09:25:07 UTC, unprotected-entity 
> wrote:
>> Just how often does one need to access the private members of 
>> a class, within a module?
>
> a lot actually. e.g. unittests

Unit tests should go through the public interface like anyone 
else. All private members and functions are implementation 
details that shouldn't matter and shouldn't break any tests if 
they're all removed.


More information about the Digitalmars-d mailing list