Except that "pseudo" sounds disparaging, and I actually like an object model
which has multiple inheritance of interfaces and single inheritance of
implementations (same as Java, and maybe C# too?). Multiple inheritance of
implementation results in ambiguity. Composition/delegation is a better
approach in my view. Lots of literature about this that the original poster
can read.

Having said that, I did have one occasion in my career when I followed an
example from Bertrand Meyer's book and implemented a tree node in C++ as a
link and a list. But in general I think implementation inheritance is
over-used and multiple inheritance can get you into trouble.

On Fri, Oct 10, 2008 at 7:57 AM, Ryan Gravener <[EMAIL PROTECTED]>wrote:

>   Pseudo multiple inheritance.
>
> Ryan Gravener
> http://twitter.com/ryangravener
>
>
>
> On Fri, Oct 10, 2008 at 10:23 AM, Richard Rodseth <[EMAIL PROTECTED]>wrote:
>
>>   And sometimes you even have interfaces with no methods. In this case
>> it's a "marker" (often a parent of other interfaces) and when used in method
>> signatures you get type checking.
>>
>>
>> On Fri, Oct 10, 2008 at 6:26 AM, Michael Schmalle <
>> [EMAIL PROTECTED]> wrote:
>>
>>>   Hi,
>>> It's ICommand.
>>>
>>> The reason is you can stack interfaces on top of each other allowing more
>>> decoupling to the implementing concrete classes.
>>>
>>> This interface is obvious. Any class that implements it needs eval() and
>>> only eval. It's like a singleton declaration of implementation.
>>>
>>> If you jammed this evel() method into IUIComponent, maybe all components
>>> don't need eval. Make sense?
>>>
>>> Also another good example of this type of interface in the flex framework
>>> is IDataRenderer, it's only declared property is 'data'.
>>>
>>> Mike
>>>
>>>  On Fri, Oct 10, 2008 at 9:19 AM, flexaustin <[EMAIL PROTECTED]>wrote:
>>>
>>>>   I was wondering if someone can explain why you would need an
>>>> interface
>>>> so short?
>>>>
>>>> INTERFACE:
>>>>
>>>> package my.package.area
>>>> {
>>>> /**
>>>> * Interface for methods that evaluate an object and return a result.
>>>> */
>>>> public interface IEval
>>>> {
>>>> /**
>>>> * Evaluates the input object
>>>> * @o the object to evaluate
>>>> * @return the computed result value
>>>> */
>>>> function eval(o:Object=null):*;
>>>>
>>>> } // end of interface IEval
>>>> }
>>>>
>>>> USAGE OF INTERFACE:
>>>>
>>>> if (value is IEval) { value = IEval(value).eval(o) };
>>>>
>>>> Cairngorm has a short interface like this as well, though I cannot
>>>> remember what it is. In Cairngorm they say its for naming or to make
>>>> the code easier to understand? I am just not sure why you would do
>>>> this? Help me see the light!
>>>>
>>>> TIA
>>>>
>>>>
>>>
>>>
>>> --
>>> Teoti Graphix, LLC
>>> http://www.teotigraphix.com
>>>
>>> Teoti Graphix Blog
>>> http://www.blog.teotigraphix.com
>>>
>>> You can find more by solving the problem then by 'asking the question'.
>>>
>>
>>
>  
>

Reply via email to