Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!samsung!olivea!mintaka!bloom-beacon!eru!hagbard!sunic!mcsun!hp4nl!media03!pkr From: pkr@media03.UUCP (Peter Kriens) Newsgroups: comp.lang.smalltalk Subject: Re: Access methods - New feature ? Keywords: Access methods, Smalltalk-80 Message-ID: <2270@media03.UUCP> Date: 22 Apr 91 08:17:36 GMT References: <1991Apr21.221149.8057@vuse.vanderbilt.edu> <1991Apr22.003659.18658@ux1.cso.uiuc.edu> Reply-To: pkr@media03.UUCP (Peter Kriens) Organization: aQute, Netherlands Lines: 26 Dan Walkowski writes: > If access methods were automatically generated for every private variable, > then this breaks down; every object can diddle with the state of every other. > Yes, frequently you need to write several access methods for several private > variables of an object, but if you are finding that you need to make ALL of > your instance variables public, then perhaps you need to rethink your design. I basically agree with this statement, but I have found that it is much more tru in technical software then information technology. The last moths{ I have been trying several times to build a program that uses a SQL database as backend and a smalltalk front end. The problem is that in those environments you basically need access to most instance variables.(the origininal database fields). Eiffel has a very nice solution for this. It allows an instance variable to be exported in the header (Smalltalk could also do that in the class definition, you could for example place a colon behinde the definition of the instance variable). So in Eiffel you can easely access those often used instance variables. The good thing is that if you decide later on to replace the instance access with a procedure, because the implementation changes, nobody notices because the syntax stays the same. Sounds like a feature I could love in Smalltalk. Unfortunately you cannot access the compiler in Digitalk smalltalk, otherwise it could be done. Peter Kriens pkr@media01