I prefer to use the object's accessors even within the object itself. As you say, it provides the benefits of encapsulation inside the class. In particular, I can change the representation of some part of it without too much disturbance. If performance becomes a demonstrated issue, I might go back on that, but usually I spend a lot more time waiting for things outside my code than I do dragging my feet inside. YMMV.
In reply to Re: Does one encapsulate a class from itself?
by kyle
in thread Does one encapsulate a class from itself?
by amarquis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |