[Mono-list] Re: Is Objective-C support possible?

Fergus Henderson fjh@cs.mu.oz.au
Tue, 19 Feb 2002 21:03:11 +1100


On 18-Feb-2002, Martin Coxall <coxall@cream.org> wrote:
> 
> > Just to clarify. The CLR does NOT dissallow multiple inheritance. It 
> > just doesn't provide explicit support for it. There is a big difference. 
> > Eiffell for .Net has multiple inheritance. John Gough's book "Compiling 
> > for the CLR" has a section on implementing MI on top of the CLR. to quote
> > "The CLR does not provide facilities for the direct implementation of 
> > multiple inheritance. In particular, the CLR mechanisms for virtual 
> > method dispatch and object layout are inherently tied to an execution 
> > model with single inheritance and multiple interfaces. Nevertheless, as 
> > the Microsoft managed c++ compiler shows, it is possible to implement MI 
> > all the same. The fundamental idea behind such an implementation is to 
> > ignore the CLR facilities for method dispatch and instead layout the 
> > v-table explicitly" he then goes on to discuss several possible ways of 
> > implementing this.
> 
> To be honest, I'm not sure that's a clarification. How can code be
> managed if it bypasses the CLR virtual execution system?

It doesn't need to bypass the CLR virtual execution system.  It is
sufficient to just bypass certain parts of it, e.g. the `callvirt'
instruction, in favour of other parts of it, e.g. the `calli' instruction,
in certain cases, e.g. code using MI.

> And, what about IL's explicit support of single inheritance?

What about it?

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.