home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / cplus / 19981 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  1.4 KB

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