home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / cplus / 11510 < prev    next >
Encoding:
Text File  |  1992-07-25  |  1.3 KB  |  34 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!munnari.oz.au!metro!extro.ucc.su.OZ.AU!dpg
  3. From: dpg@extro.ucc.su.OZ.AU (D P Gilbert)
  4. Subject: Re: Language extensions for run-time type identification
  5. Message-ID: <dpg.712022806@extro.ucc.su.OZ.AU>
  6. Sender: news@ucc.su.OZ.AU
  7. Nntp-Posting-Host: extro.ucc.su.oz.au
  8. Organization: Sydney University Computing Service, Sydney, NSW, Australia
  9. References: <14ft2uINNjh4@agate.berkeley.edu> <rmartin.711829160@thor> <1992Jul24.063825.1395@uunet.uu.net!mole-end>
  10. Date: Sat, 25 Jul 1992 00:06:46 GMT
  11. Lines: 21
  12.  
  13. mat@uunet.uu.net!mole-end writes:
  14.  
  15. [Some nested stuff removed.]
  16.  
  17. >There's another group of classes for which polymorphic behavior makes
  18. >little sense: those that are used to implement or provide data structures
  19. >(lists, trees, etc.)
  20.  
  21. I agree with the general thrust of your argument but I think I know at
  22. least one exception to the above generalisation. A base class supporting
  23. nodes in a multi-way tree may like to order its children by some criteria
  24. supplied by its derived classes (i.e. a "virtual int compare(Node &)"
  25. method). Also I'd like to be able to recursively clear down the tree
  26. via the base class pointers. This requires virtual destructors in
  27. order to work.
  28. >-- 
  29. > (This man's opinions are his own.)
  30. > From mole-end                Mark Terribile
  31.  
  32. > uunet!mole-end!mat, Somewhere in Matawan, NJ
  33. Doug Gilbert
  34.