3 ms·
Both JRuby and Jython compile dynamic languages into the JVM; the instruction set of the VM makes it fairly difficult to deal with dynamic types and to deal wit
by akeefer 18y ago
Both JRuby and Jython compile dynamic languages into the JVM; the instruction set of the VM makes it fairly difficult to deal with dynamic types and to deal with reloading methods on the fly (I believe that in Java the only real way to unload a class is to throw away the whole classloader associated with it). If you're really curious about how it's done, check out Charles Nutter's blog (http://blog.headius.com/2008/09/first-taste-of-invokedynamic.html http://blog.headius.com/2008/09/first-taste-of-invokedynamic... is pretty interesting) or download the JRuby source and check it out.
That said, it's certainly not trivial, so it still might not qualify as "sane."
- russell 18y agoSorry. I meant source to source, as in Python source to Java source. Python to java byte code, as in Jython, is a reasonable thing to do, but not easy.