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