Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!ux1.cso.uiuc.edu!ux1.cso.uiuc.edu!m.cs.uiuc.edu!p.cs.uiuc.edu!johnson From: johnson@p.cs.uiuc.edu Newsgroups: comp.lang.smalltalk Subject: Re: Data Hiding... Message-ID: <80500086@p.cs.uiuc.edu> Date: 23 Jan 90 17:40:02 GMT References: <20@<4820c7e4> Lines: 12 Nf-ID: #R:<4820c7e4:20:p.cs.uiuc.edu:80500086:000:617 Nf-From: p.cs.uiuc.edu!johnson Jan 22 08:00:00 1990 I agree with David Yon that accessing another's objects instance variables is often (usually?) not a good thing to do. I call this treating an object like a record. When I see code that does this (all too often I am the author, but I fix other people's code, too) then I will try to understand why the program is accessing the instance variables and try to create new methods in the object's class that eliminate the need to have the accessing methods. This almost always improves the quality of the code. Sometimes accessing the instance variables is the correct thing to do, but often it is not. Ralph Johnson