James Britt
7/29/2007 6:33:00 PM
Stephan Dale wrote:
> The main problem with this approach seems to be that it places a greater
> responsibility on the programmer to ensure that there is no mismatch
> between what a ClassName instance reports its variable to be and what
> the getter method says it is.
Why is that a problem? The public interface should not be coupled to
the implementation, nor expose implementation details.
Knowing that an object responds to foo= should not mean I can count on
the object having an instance variable named @foo.
--
James Britt
"I often work by avoidance."
- Brian Eno