To interface or not to interface

Walter Bright newshound1 at digitalmars.com
Tue May 25 20:29:34 PDT 2010


Steven Schveighoffer wrote:
> On Mon, 24 May 2010 18:13:38 -0400, Walter Bright 
> <newshound1 at digitalmars.com> wrote:
> 
>> Steven Schveighoffer wrote:
>>> All an interface does is give an abstract representation of functions 
>>> that are *already there*.  Removing the interface does not remove the 
>>> functions that implemented the interface.
>>
>> Then why do interfaces need to be part of the collection component? 
>> Why can't the user add them if he wants them?
> 
> How do you add an interface to a class?

Define an interface who's member functions call the class' member functions.


More information about the Digitalmars-d mailing list