home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!fuug!kiae!demos!newsserv
- From: sasha@ipm.msk.su (Alexander Kolbasov)
- Newsgroups: comp.lang.c++
- Subject: Re: Need help implementic data structures of generic objects
- Date: Mon, 21 Dec 92 16:54:14 +0300
- Distribution: world
- Organization: unknown
- Message-ID: <9212211354.AA03712@ipm>
- Sender: news-service@newcom.kiae.su
- Reply-To: sasha@ipm.msk.su
- References: <1992Dec8.165230.2587@ucc.su.OZ.AU> <42186@sdcc12.ucsd.edu> <1992Dec11.233253.27540@informix.com>
- Lines: 36
-
- mat@mole-end.matawan.nj.us (Mark Terrible) writes:
-
- > The template should describe the nature of a collection; the template
- > should be instantiated for the type of the thing being collected.
- > With the exception of collections of things to freeze and thaw and
- > a few like problems, there are no truly heterogenous lists in problems.
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- > You are collecting objects because you are going to gurklemont them;
- > then you have a list of gurklemont'ables, NOT a list of wholly anonymous
- > Objects.
-
- First of all the question: Are you SURE that there are no truly heterogenous
- lists in problems?
-
- Suppose that you design a collection class for the library. You don't know,
- who and how will use it. You design the collection abstraction. The ONLY
- service of the Collection abstraction is to store something provided by its
- clients and to retrieve the SAME THING that was stored. There is nothing in
- the Collection abstraction that should know what kind of things does it
- contain. It doesn't matter. And there is no reason (except some language
- limitations) for the collection abstraction to be strictly homogenous.
- Homogenous Collection is a very limited subclass of general Collection. And I
- bet that great manu users will find the Collection of anything very very
- useful. As for your statement, I'd restate it in the following way:
-
- There are problems without truly heterogenous lists.
-
- - Sasha -
- __
- .......................................................
- . Alexander V. Kolbasov | INTERNET sasha@ipm.msk.su .
- . Moscow, Russia | (095) 434-2031 (o) .
- .......................................................
-
-
-
-