Re: Question (about C+, ObjC, ObjC++ ; long)
Re: Question (about C+, ObjC, ObjC++ ; long)
- Subject: Re: Question (about C+, ObjC, ObjC++ ; long)
- From: Chris Gehlker <email@hidden>
- Date: Mon, 03 Dec 2001 09:16:39 -0700
On 12/3/01 3:19 AM, "email@hidden" <email@hidden> wrote:
>
Clearly multiple inheritance is required if you want an object with
>
members coming from two different base classes. However it is difficult to
>
find good examples for that; usually it is just a design error to do so,
>
one of the parent classes should be present only as a member.
The was a long post and I agree with almost all of it. I don't think mixins
are a design error, however, and they are fairly easy to do in ObjC. Read
the section on Forwarding in "Object Oriented Programming with ObjC."
This technique isn't needed that often, it won't solve the original poster's
problem, but when it's appropriate it is cleaner than trying to code around
the problem, IMHO.
--
C++: The power, elegance and simplicity of a hand grenade.