Assigning Interface to Object

Simen kjaeraas simen.kjaras at
Wed Jan 19 23:45:15 PST 2011

Mandeep Singh Brar <mandeep at> wrote:

> "This would be easily resolved if interfaces were known to be Objects. "
> But shouldnt this be the case, because there would be nothing called as  
> an
> Interface which can be pointed to; it would be an Object which is  
> implementing an
> interface which is being pointed to. So shouldnt Interfaces be Objects  
> too.
> Otherwise, wouldnt it defeat the purpose of having Object as the base  
> class for
> everything.

Object is only the base class for all D classes. Interfaces may also
represent COM objects or C++ classes, which are not subclasses of Object.


More information about the Digitalmars-d-learn mailing list