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

12345swordy alexanderheistermann at gmail.com
Thu Nov 1 16:19:57 UTC 2018

On Thursday, 1 November 2018 at 14:17:13 UTC, Atila Neves wrote:
> On Monday, 29 October 2018 at 23:15:58 UTC, unprotected-entity 
> wrote:
>> On Monday, 29 October 2018 at 15:50:56 UTC, Jonathan M Davis 
>> wrote:
>> It's not (just) that I don't like it, it's that I don't like 
>> not giving the programmer the tool to better encapsulate their 
>> code (specifically classes) *within* a module.
> You don't need to protect code in your module from other code 
> in your module. If you do, put them in different modules.
That typically involves creation of files, which is not always 
ideal if you are working with code that is considerably small.

More information about the Digitalmars-d mailing list