Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!munnari.oz.au!metro!extro!objtch From: objtch@extro.ucc.su.OZ.AU (Peter Goodall) Newsgroups: comp.lang.smalltalk Subject: Re: Access methods - New feature ? Keywords: Access methods, Smalltalk-80 Message-ID: Date: 14 May 91 02:21:56 GMT References: <1991Apr21.221149.8057@vuse.vanderbilt.edu> <1991Apr22.003659.18658@ux1.cso.uiuc.edu> <2270@media03.UUCP> <1991Apr22.130452.6181@ccs.carleton.ca> Sender: news@metro.ucc.su.OZ.AU Organization: Sydney University Computing Service, Sydney, NSW, Australia Lines: 38 Nntp-Posting-Host: extro.ucc.su.oz.au knight@mrco.carleton.ca (Alan Knight) writes: [Even more stuff about automatically generating access methods omitted] > >A nearly equivalent feature, and one which preserves a little more >encapsulation than automatically writing all acces methods is to allow >them to be written on command, one at a time. i.e. have a menu item >which writes access methods for a single instance variable. I've seen >this done in Smalltalk/V, and it could easily be done in Smalltalk-80. > > The disadvantage of this method is that it discourages comments, >particularly a problem in /V where there are no class comments. >Coming across the automatically written message >glorch: aValue > "Set the value of the instance variable glorch to aValue" > glorch := aValue. >is annoying (to say the least), when there is no indication what kind of >a thing glorch is or what it is used for. >-- >-- > Alan Knight knight@mrco.carleton.ca +1 613 788 5783 Support > Dept. of Mechanical and Aeronautical Engineering the > Carleton University, Ottawa, Ontario, Canada, K1S 5B6 LPF You can always enforce some sort of comment using a request for input. If you are automatically generating access, the method is unlikely to be complex. -- ------------------------------------------------------------------------ Peter Goodall - Smalltalk Systems Consultant - objtch@extro.ucc.su.oz.au ObjecTech Pty. Ltd. - Software Tools, Training, and Advice 162 Burns Bay Rd, LANE COVE, NSW, AUSTRALIA. - Phone/Fax: +61 2 418-7433