Re: Ruby to java or java to ruby converter

Vinod Kone wrote:

hi,

am a newbie to ruby and was wondering whether there is any ruby2java or
java2ruby converter? we are planning to compare both the languages based
on some benchmarks…so thought a converter would come in handy. any
suggestions?

I have implemented a rudimentary Ruby to Javascript converter. So I
don’t
think it should be much harder to do the same with Java. Of course as
Java is
static typed, one would need to pass Objects everywhere and do runtime
type-casting all the time, unless one implements some kind of type
inference
for Ruby (which I think is possible and usable is some situations). So
in the
end, I don’t think it would be much faster than Ruby, maybe even slower.
Well, it would probably be faster than JRuby but much less flexible (as
I’m
talking only about a subset of Ruby, without the whole dynamism Ruby
provides
you with).

Regards,

Michael