home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c:20004 comp.lang.c++:19656
- Newsgroups: comp.lang.c,comp.lang.c++
- Path: sparky!uunet!cs.utexas.edu!sun-barr!ames!kronos.arc.nasa.gov!butch!netcomsv!netcom.com!erc
- From: erc@netcom.com (Eric Smith)
- Subject: Re: discriminated unions (Re: C/C++ Correctness (was: Re: C/C++ Speed))
- Message-ID: <1993Jan21.075642.6482@netcom.com>
- Organization: Netcom - Online Communication Services (408 241-9760 guest)
- References: <TMB.93Jan20160311@arolla.idiap.ch> <1993Jan20.184221.19003@netcom.com> <1993Jan21.004105.1335@ucc.su.OZ.AU>
- Date: Thu, 21 Jan 1993 07:56:42 GMT
- Lines: 13
-
- In article <1993Jan21.004105.1335@ucc.su.OZ.AU> maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:
- > Later I can write a breadth first search.
- > I dont have to change anything to write the breadth first search.
- > Its just a global function taking the tree as an argument.
-
- Ok, now I understand. You want to be able to add functionality to a class
- without changing the class itself nor deriving a new version of it. Your
- discriminated unions would be helpful toward that goal, but I still don't
- see any overwhelming advantage of that goal. The only real advantage I can
- see is that you don't have to use a new class name for your new version.
-
- Other than cluttering class name space, are there any disadvantages in
- deriving new classes to add functionality?
-