home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / cplus / 16688 < prev    next >
Encoding:
Internet Message Format  |  1992-11-20  |  1.2 KB

  1. Path: sparky!uunet!cs.utexas.edu!uwm.edu!linac!att!att!allegra!alice!ark
  2. From: ark@alice.att.com (Andrew Koenig)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Multiple Inheritance - Necessary?
  5. Keywords: c++ inheritance
  6. Message-ID: <24263@alice.att.com>
  7. Date: 21 Nov 92 03:24:29 GMT
  8. Article-I.D.: alice.24263
  9. References: <By17An.4uH@usenet.ucs.indiana.edu>
  10. Reply-To: ark@alice.UUCP ()
  11. Organization: AT&T Bell Laboratories, Murray Hill NJ
  12. Lines: 18
  13.  
  14. In article <By17An.4uH@usenet.ucs.indiana.edu> ezachris@iroquois.ucs.indiana.edu writes:
  15.  
  16. > A friend of mine who programs in Objective-C argues that multiple  
  17. > inheritance is unnecessary and complicated. 
  18.  
  19. Hmmm... Objective-C doesn't have multiple inheritance, right?
  20.  
  21. > Let's say you have a pencil-object and an eraser-object and to create a  
  22. > pencil-with-an-eraser-on-it you'd inherit from both the pencil and the  
  23. > eraser object, right?
  24.  
  25. Not unless you want to say that a pencil-with-an-eraser on it is both a
  26. kind of pencil and a kind of eraser.  At least in ordinary circumstances,
  27. I would consider it a pencil only, so I'd inherit from pencil but give
  28. it a member of type eraser.
  29. -- 
  30.                 --Andrew Koenig
  31.                   ark@europa.att.com
  32.