It's a high level conceptual question. I have two separate code bases that serve the same purpose, one built in Python and the other in Ruby. I need to develop something that will run on JVM. So I have two choices: convert the Python code to Jython or convert the Ruby to JRuby. Since I don't know any of them, I was wondering if anyone can give me some guidance. Like which one runs faster, or more importantly which one has tools available for easy code migration(.pyc to .jar files)?
In both cases, most of the code should Just Work™. I don't know of a really compelling reason to choose Jython over JRuby or vice versa if you'll be learning either from scratch. Python places a heavy emphasis on readability and not using "magic", but Ruby tends to give you a little more rope to do fancy things, e.g., define your own DSL. The main difference is in the community, and largely revolves around the different focus mentioned above.
If you are going to be investing time and effort into either platform you should check how active the development is on both platforms. Subscribe to the mailing lists and newsgroups to get an idea of the community, check the source control system for both projects and get a feeling for how active the development is.
I am more familiar with Python than Ruby. The Jython project after a period slow movement has really picked up momentum, a Python 2.5 compatible version was released in June. This is a major step forward as Python 2.5 introduces some very useful language enhancements: http://docs.python.org/whatsnew/2.5.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With