Possible @property compromise

TommiT tommitissari at hotmail.com
Tue Jan 29 20:30:41 PST 2013


On Wednesday, 30 January 2013 at 04:06:02 UTC, deadalnix wrote:
>> I don't agree. I think public variables are an encapsulation 
>> problem, period. And again, by 'public' I mean: "really, truly 
>> public, not kidding".
>
> Sounds like religious reasoning.

I don't understand you. According to wikipedia, encapsulation is:

"A language mechanism for restricting access to some of the 
object's components."

Member variable is a component of an object. Public access means 
un-restricted access. Therefore, public member variable is not 
encapsulated. Therefore, public member variable is a problem in 
encapsulation, by definition. I dare you to find a single 
religious cell in me.


More information about the Digitalmars-d mailing list