Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!decwrl!argosy!kentb From: kentb@argosy.UUCP (Kent Beck) Newsgroups: comp.lang.smalltalk Subject: Re: Access methods - New feature ? Keywords: Access methods, Smalltalk-80 Message-ID: <1251@argosy.UUCP> Date: 23 Apr 91 18:03:57 GMT References: <1991Apr21.221149.8057@vuse.vanderbilt.edu> Sender: news@argosy.UUCP Reply-To: kentb@shark.UUCP (Kent Beck) Organization: MasPar Computer Corp, Sunnyvale CA Lines: 14 I don't wish to flame the original poster, but I think automatic compilation of access methods makes it entirely too easy to fall back into "rape and plunder" mode, where are object are expensive data structures. As Dave Ungar has pointed out, objects are nothing more than their behavior. If part of their behavior is to return another object, fine, but I like the way the annoyance of defining an instance variable access method forces me to stop and think, "Should this object be doing more, so that other objects would no longer need access to this variable?" This flies in the face of the "access method for all variables" camp, but to me the value of added encapsulation far outweighs the minor hassle of changing instance variable references to messages if such a change becomes necessary. Kent