[fpc-pascal] Inherit interface from 2 interfaces
Andreas Dorn
adornno1 at web.de
Tue Apr 12 01:44:28 CEST 2011
On Fri, 8 Apr 2011,michael.vancanneyt worte:
> The whole idea of interfaces is to avoid multiple inheritance.
>
Hm. I don't believe that.
One of the major points of interfaces is indeed to avoid the problems
of multiple class inheritance (diamond problems - i.e. problems caused by
conflicting implementations of a method in different ancestor classes).
But Interfaces themselves don't have an implementation, so those
diamond problems simply don't exist for them.
I don't think there's a good reason against multiple interface inheritance.
Not having multiple interface inheritance complicated certain situations
for myself.. forcing me to put runtime interface-casts into my code that
a compiler with multiple interface inheritance could have checked at compiletime.
--
Andreas
More information about the fpc-pascal
mailing list