Xref: utzoo comp.lang.misc:7107 comp.object:2919 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!sun-barr!newstop!exodus!red-dwarf!pallas From: pallas@eng.sun.com (Joseph Pallas) Newsgroups: comp.lang.misc,comp.object Subject: Re: CHALLENGE: heterogeneous collections Message-ID: Date: 27 Mar 91 17:31:07 GMT References: <1991Mar22.210725.29448@neon.S <1991Mar25.220525.11087@leland.Stanford.EDU> <26714:Mar2602:52:1891@kramden.acf.nyu.edu> Sender: news@exodus.Eng.Sun.COM Followup-To: comp.lang.misc Lines: 20 In objtch@extro.ucc.su.oz.au (Peter Goodall) writes about a collection of Objects in Smalltalk. But a collection of Objects is not a heterogeneous collection. This may be a little confusing because Object is a universal supertype in Smalltalk. Let's be concrete: A heterogeneous collection is one for which no single type can be safely assigned to all members of the collection. If all of the members of the collection have some common supertype, AND no operation is performed on any member of the collection that is not valid for that common supertype, then the collection is a homogeneous collection of members of that supertype. So if you have a collection of objects, you have to do something to those objects that you can't safely do to Objects in order to have a heterogeneous collection. joe