On Tue, 17 Apr 2001, Dave Thomas wrote:
> Mathieu Bouchard <matju / sympatico.ca> writes:
> > I think the most difficult part of writing a "Ruby for Java" interpreter
> > is getting the parser right. Of course that parser should be written in
> > Ruby itself. I think I could get my head around most of the rest.
> How would you handle singleton methods efficiently: would every method 
> call have to go through a java Method? I'm not a classloader expert,
> but are there also issues with things like:

Given Ruby's multiple-inheritance, side-inheritance, dynamic method
redefinition, #method_missing, singleton methods, singleton inheritance,
amorphous instance-variable namespace, etc., you shouldn't be even trying
to make Java classes work like Ruby classes or vice-versa. 

This means I generally agree with Stefan Matthias Aust; from Java you'd
get to call Ruby methods using .send(Selector,Args,Iter) or something
similar. In the jruby interpreter I began writing, you have a class RClass
like the one in the C implementation, and most of the rest of the base
objects map in a similar way, except you don't have the same memory
layout (GC, ObjectSpace, & related artefacts, are gone)

matju