home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / cplus / 19994 < prev    next >
Encoding:
Text File  |  1993-01-28  |  2.4 KB  |  63 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!news.univie.ac.at!scsing.switch.ch!univ-lyon1.fr!ghost.dsi.unimi.it!batcomputer!munnari.oz.au!metro!extro.ucc.su.OZ.AU!maxtal
  3. From: maxtal@extro.ucc.su.OZ.AU (John MAX Skaller)
  4. Subject: Re: Why is C++ not considered a true OOL?
  5. Message-ID: <1993Jan27.152506.20935@ucc.su.OZ.AU>
  6. Sender: news@ucc.su.OZ.AU
  7. Nntp-Posting-Host: extro.ucc.su.oz.au
  8. Organization: MAXTAL P/L C/- University Computing Centre, Sydney
  9. References: <24656@alice.att.com> <1993Jan21.005415.2812@ucc.su.OZ.AU> <ANDY.93Jan22102931@elviss.eng.sun.com>
  10. Date: Wed, 27 Jan 1993 15:25:06 GMT
  11. Lines: 50
  12.  
  13. In article <ANDY.93Jan22102931@elviss.eng.sun.com> andy@elviss.eng.sun.com (Andrew Davidson) writes:
  14. >In article <1993Jan21.005415.2812@ucc.su.OZ.AU> maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:
  15. >
  16. >>
  17. >>The fourth alternative (mixins) is superior :-)
  18. >>
  19. >>....
  20. >>
  21. >>...
  22. >>
  23. >>But your greatest achievement, Bjarne, in my opinion,
  24. >>was the name dominance rule, because, coupled with virtual
  25. >>bases and abstract classes that enables mixins.
  26. >>
  27. >
  28. >what are mix ins?
  29. >
  30.     So many people have asked that I'm preparing an answer
  31. and some examples. Sorry, its not ready yet.
  32.  
  33.     Briefly one way to do mixins: 
  34. I declare some 'Axiom' classes with various
  35. interfaces---most of the functions are pure virtual.
  36.  
  37.     I use Multiple Virtual Inheritance to merge several
  38. of these classes to form a new abstraction. I can also
  39. add new functions defined in terms of the base pure virtuals.
  40. One might call these 'Theorem' classes. They are the user
  41. interface classes.
  42.  
  43.     The Axioms are useless without implementations.
  44. So I define various implementations that might be useful:
  45. these are the 'Model' classes.
  46.  
  47.     Finally, I mix up an implementation of my chosen abstraction
  48. be just virtual derivation from the Model classes that I want: some
  49. will be chosen for speed, other for compactness.
  50.  
  51.     The exact mix of implementation is irrelevant after
  52. the object is constructed: the object is always known
  53. statically by its 'Theorem' name. Implementation details
  54. are hidden, polymorphism does virtual function calls
  55. via from Theorem via the base Axioms and into the
  56. Models (called 'sibling call').
  57.  
  58. -- 
  59. ;----------------------------------------------------------------------
  60.         JOHN (MAX) SKALLER,         maxtal@extro.ucc.su.oz.au
  61.     Maxtal Pty Ltd, 6 MacKay St ASHFIELD, NSW 2131, AUSTRALIA
  62. ;------ SCIENTIFIC AND ENGINEERING SOFTWARE ---ph:  2 799 8223 --------
  63.