"Aleksei Guzev" <aleksei.guzev / bigfoot.com> wrote in message
news:ar9qtj$fq9up$1 / ID-167200.news.dfncis.de...
>
> "MikkelFJ" <mikkelfj-anti-spam / bigfoot.com> wrote in message
> news:3dd55e48$0$35977$edfadb0f / dread13.news.tele.dk...
> >
> > You can compile Ruby into IL but the objects will just be objects. The
> main
> > difference between this and interop is that there would be no separate
> > interpreter with separate memory management.
> >
>
> Whould you give some example, please. For instance a peace of IL
> implementing adding a singleton method to a .NET object.

Considering the time I would need to this, I'd rather not - not unless I
actually planned to do a Ruby implementation in .NET - I certainly have been
tempted many times - I've just got too many other projects.

But a hash based class layout instead of a vtable based class layout would
deal with such issues. Obviously the tables would need to be chained somehow
to handle object specialization.
You can make it as fancy as you like - for instance optimized branching code
for classes where you assume it is defined once then never modified - and
disable that feature when you discover you were wrong.

The main point is that whatever lookup method you choose, the public
interface of a Ruby class would be the Item method or perhaps there is a
more advanced way to intercept dynamic method lookups as I'm not that much
into the details of .NET.

What matters is that you can treat it as an object in other .NET languages
with respect to storing references and calling methods.

JScript and VBScript runs .NET and you can say any of these languages are
big on static typing.

Mikkel