Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!husc6!psuvax1!psuvm.bitnet!cunyvm!nyser!itsgw!imagine!rpics!adamsf From: adamsf@rpics (Frank Adams) Newsgroups: comp.lang.smalltalk Subject: Re: Specify New Classes in Smalltalk/V Summary: if you don't understand the issues, use subclass Message-ID: <1766@imagine.PAWL.RPI.EDU> Date: 17 Nov 88 18:49:47 GMT References: <1361@aucs.UUCP> <3269@entire.UUCP> Sender: news@imagine.PAWL.RPI.EDU Reply-To: adamsf@turing.cs.rpi.edu (Frank Adams) Distribution: na Organization: RPI CS Dept. Lines: 18 In article <3269@entire.UUCP> elt@entire.UUCP (Edward L. Taychert) writes: >In article <1361@aucs.UUCP>, 831059l@aucs.UUCP (Langlois) writes: >> When you choose to add a subclass to an existing class, you are then asked >> to select from a menu containing subclass, variableSubclass, >> variableWordSubclass, and variableByteSubclass. > >use variableSubclass, this means that object instance variable can reference >any kind of object. This is not, in general, good advice. For most classes, you should choose just plain subclass. This means that the instance variables of the instances of the class will all have names. These named instance variables can each reference any kind of object. Use the variable* forms only for things like arrays which are going to maintain a list of members. Even then, consider whether it wouldn't be better to have, say, an instance variable which always contains an array instead of indexed instance variables. #! rnews