how to make private class member private
psychoticRabbit
meagain at meagain.com
Tue Mar 13 06:58:08 UTC 2018
On Tuesday, 13 March 2018 at 06:03:11 UTC, Mike Parker wrote:
>
> The same applies here. Encapsulation simply isn't broken by
> this feature.
What you're saying, is in D, class encapsulation is really
'module' encapsulation.
I get it. Fine. It's an intersting design decision.
But, in doing that, D has shifted the boundary of class
encapsulation, to a boundary that is outside the class.
To me, that sounds like D has broken class encapsulation. I don't
know how else one could describe it.
I continue to think, that class encapsulation is sacred, a well
defined, well understood, concept that has been around for a very
long time.
private could have still meant private, and surely someone could
have come up with a different access modifier to mean 'private at
module level'.
Was that too hard the language designers?
Was it not hard, but just to complex to implement?
I don't get it.
More information about the Digitalmars-d-learn
mailing list