home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / next / programm / 8098 < prev    next >
Encoding:
Internet Message Format  |  1993-01-13  |  1.9 KB

  1. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!dtix!mimsy!alex
  2. From: alex@cs.umd.edu (Alex Blakemore)
  3. Newsgroups: comp.sys.next.programmer
  4. Subject: Re: The Darker Side of C++ (forwarded)
  5. Message-ID: <63366@mimsy.umd.edu>
  6. Date: 13 Jan 93 05:51:40 GMT
  7. References: <1993Jan12.165154.26915@dvorak.amd.com> <1iv5ijINN8ba@pith.uoregon.edu>
  8. Sender: news@mimsy.umd.edu
  9. Distribution: usa
  10. Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742
  11. Lines: 29
  12.  
  13. In article <1iv5ijINN8ba@pith.uoregon.edu> bjorn@darmok.uoregon.edu (Bjorn S. Fjeld Pettersen) writes:
  14. > (BTW, where is that multiple inheritance in Obj-C???)
  15.  
  16. and where is dynamic binding in C++?
  17.  
  18. about MI, it is a technique, _a_ solution to a class of programming problems.
  19. same with delegation using dynamic binding in Obj-C.
  20.  
  21. in C++, MI is critical because inheritance is the main tool in the langugage.
  22. in other languages, MI may not be as critical because other language features
  23. can be used to solve problems (perhaps more elegantly) for which C++ requires MI.
  24.  
  25. for example, MI is often used to mix in functionality - there is a true parent class
  26. in an abstract sense and several other parents that just provide some methods.
  27. Delegation can play the same role in Obj-C, other languages may have other features
  28. that can achieve the same effect.
  29.  
  30. classes that are really multiple things at the same time (both an airplane and a radio)
  31. really benefit from MI, its the most natural way to express that - but many people state
  32. that use of MI is rare compared to the others - and even then there are other ways
  33. (let each airplane _contain_ a radio).
  34.  
  35. Bottom Line: MI can be very useful in some situations and languages, but that
  36. doesnt mean it should be added to every OO language.  there may be other langage
  37. features that obviate much of the need for MI in that case.  MI does bring some
  38. complications as well.
  39. -- 
  40. ---------------------------------------------------
  41. Alex Blakemore alex@cs.umd.edu   NeXT mail accepted
  42.