home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / cplus / 18418 < prev    next >
Encoding:
Internet Message Format  |  1992-12-25  |  2.2 KB

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