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

12345swordy alexanderheistermann at gmail.com
Fri Nov 2 14:19:02 UTC 2018


On Friday, 2 November 2018 at 11:50:05 UTC, Atila Neves wrote:
> On Thursday, 1 November 2018 at 18:30:33 UTC, 12345swordy wrote:
>> On Thursday, 1 November 2018 at 17:58:34 UTC, Atila Neves 
>> wrote:
>>> [...]
>> Not the point. We talking about encapsulating code which 
>> involves creation of another modules which always involved in 
>> creation of another file. Which is not always good solution if 
>> your code is remarkably small.
>
> That wasn't my point either. My point is that if your code is 
> "remarkably small", you don't need _any_ good engineering 
> practices. You don't need encapsulation, abstraction, 
> maintainability, anything. It's like killing an ant with a 
> bazooka.
When I said, "small code" I wasn't referring to the entire 
program itself, I was referring to the code being encapsulated.

-Alex




More information about the Digitalmars-d mailing list