home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ogicse!cs.uoregon.edu!sgiblab!munnari.oz.au!metro!extro.ucc.su.OZ.AU!maxtal
- From: maxtal@extro.ucc.su.OZ.AU (John MAX Skaller)
- Newsgroups: comp.lang.c++
- Subject: Re: MI vs. SI
- Message-ID: <1993Jan26.215837.3981@ucc.su.OZ.AU>
- Date: 26 Jan 93 21:58:37 GMT
- Article-I.D.: ucc.1993Jan26.215837.3981
- References: <1993Jan20.022321.18020@borland.com> <1993Jan21.093918.3738@fmrco.uucp> <1993Jan21.205125.7963@informix.com>
- Sender: news@ucc.su.OZ.AU
- Organization: MAXTAL P/L C/- University Computing Centre, Sydney
- Lines: 20
- Nntp-Posting-Host: extro.ucc.su.oz.au
-
- >
- >What about using delegation through class members?
- >
- Delegation is more powerful than inheritance, and thus
- more error prone and harder to use. Mixins are the borderline:
- the mixin demo I'm writing at the moment uses delegation
- where inheritance just cant cope.
-
- In particular, with inheritance construction/destruction
- are automatic, whereas with delegation you have to have some
- protocol to decide when and who deletes the delegated to class.
- (In languages with garbage collection the problem is less severe,
- which is why perhaps in Stalk delegation is a more workable
- substitue for inheritance than in C++)
-
- --
- ;----------------------------------------------------------------------
- JOHN (MAX) SKALLER, maxtal@extro.ucc.su.oz.au
- Maxtal Pty Ltd, 6 MacKay St ASHFIELD, NSW 2131, AUSTRALIA
- ;------ SCIENTIFIC AND ENGINEERING SOFTWARE ---ph: 2 799 8223 --------
-