A renewed call for interface methods with bodies

Jesse Phillips jessekphillips at gmail.com
Mon Jan 28 09:29:12 PST 2008


On Sun, 27 Jan 2008 19:35:02 -0500, Burton Radons wrote:

> BCS Wrote:
> 
>> Ary Borenszweig wrote:
>> > Doesn't that lead to multiple inheritance, with all its complexities?
>> 
>> I think it would be more complex than the current implementation but
>> not that complex.
> 
> It would be simpler. Classes and interfaces are implemented almost
> identically in DMD. There are simply some checks that prevent interface
> methods from having bodies. This is not supposition - keep in mind that
> I ported DMD to Linux six years ago
> (http://www.opend.org/dli/DLinux.html).
> 
> There may be some code generation bugs, but they wouldn't be hard to
> squash.

I don't think anyone is arguing whether it would be possible to implement 
or not. The reason there are checks added to interfaces is because you 
can inherit from more than one interface, but classes have an added check 
to prevent that. 



More information about the Digitalmars-d mailing list