home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!uwm.edu!linac!att!att!allegra!alice!ark
- From: ark@alice.att.com (Andrew Koenig)
- Newsgroups: comp.lang.c++
- Subject: Re: Multiple Inheritance - Necessary?
- Keywords: c++ inheritance
- Message-ID: <24263@alice.att.com>
- Date: 21 Nov 92 03:24:29 GMT
- Article-I.D.: alice.24263
- References: <By17An.4uH@usenet.ucs.indiana.edu>
- Reply-To: ark@alice.UUCP ()
- Organization: AT&T Bell Laboratories, Murray Hill NJ
- Lines: 18
-
- In article <By17An.4uH@usenet.ucs.indiana.edu> ezachris@iroquois.ucs.indiana.edu writes:
-
- > A friend of mine who programs in Objective-C argues that multiple
- > inheritance is unnecessary and complicated.
-
- Hmmm... Objective-C doesn't have multiple inheritance, right?
-
- > Let's say you have a pencil-object and an eraser-object and to create a
- > pencil-with-an-eraser-on-it you'd inherit from both the pencil and the
- > eraser object, right?
-
- Not unless you want to say that a pencil-with-an-eraser on it is both a
- kind of pencil and a kind of eraser. At least in ordinary circumstances,
- I would consider it a pencil only, so I'd inherit from pencil but give
- it a member of type eraser.
- --
- --Andrew Koenig
- ark@europa.att.com
-