A renewed call for interface methods with bodies

Bruce Adams tortoise_74 at yeah.who.co.uk
Fri Jan 25 17:04:06 PST 2008


On Fri, 25 Jan 2008 18:55:26 -0000, BCS <BCS at pathlink.com> wrote:

> Christopher Wright wrote:
>> Burton Radons wrote:
>>
>>> I'd like to remind everyone about this lacking feature, why it's  
>>> important, and how the lack of it negatively impacts interface use.  
>>> It's important for two tasks: when you're writing an interface, and  
>>> when you're using an interface from someone else (through  
>>> COM/CORBA/etc).
>>   We have that, but you have to call it 'abstract class' rather than  
>> 'interface'.
>>  What you are asking for is essentially multiple inheritance -- that's  
>> the only difference between the two that I can see.
>
> these interfaces would have no data members.

An interface is a set of related operations with no data members.

An abstract base class may also define an interface.
It may or may not partially implement the interface.
It may or may not contain data members.
The interface defined by the class could in principle be abstracted to an  
interface.

Any misguided redefinitions of interfaces to include data members or  
implementations
are in fact defining abstract base classes.



More information about the Digitalmars-d mailing list