On Wednesday, 30 January 2013 at 04:39:13 UTC, Adam D. Ruppe wrote:
There's times when a member variable manages its own invariant and any of its values is valid for the containing class, in which case the container doesn't need to further restrict access to it.

But yes, there are times, when a public member variable, which encapsulates its own data, is truly designed as a part of the interface, in which case it doesn't need to be encapsulated any further.

Reply via email to