how to make private class member private

psychoticRabbit meagain at meagain.com
Mon Mar 19 01:11:43 UTC 2018


On Sunday, 18 March 2018 at 11:12:46 UTC, Alex wrote:
>
> ´´´
> Are there any scenarios in which the person writing the class, 
> would want to encapsulate their class, or some parts of it, 
> from the rest of a module (while being forced to put the class 
> in this module)?
> ´´´
>
> The answer is no. As the person which is writing the class has 
> always the power to decide which module to edit to put the 
> class in.
>
> And due this fact, the statement
>
>> The fact is, the creator of the class is also the creator of 
>> the module..
>
> is the coolest semantic statement of the whole thread so far, I 
> think :)

Well, it seems to me, that the only real objection one can have 
to improving encapsulation within a module, is objecting to 
improving encapsulation within a module.

The fact that the creator of a class, is also the creator of the 
module that contains that class, is not a valid reason for not 
seeking to improve encapsulation of that class.



More information about the Digitalmars-d-learn mailing list