Re: Groovy Or JRuby
Friday, November 30th, 2007Martin Fowler makes an interesting claim in GroovyOrJRuby:
A strong reason to prefer Ruby is the fact that it lives in multiple implementations.
Fowler is alluding to the fact that Groovy runs on the JVM only, whereas “Ruby can run directly on mainstream operating systems with a C runtime, and is starting to run on .NET’s CLR”. I don’t see this as a strong advantage for Ruby at all, for two main reasons:
- If you need portability across mainstream operating systems, you already have it with the JVM (to a similar enough extent as with Ruby).
- If you need tight integration with a platform, I don’t think either the JVM or CRuby implementation has a clear advantage.
When you start a project, you need to decide what tradeoff to make between portability and depth of platform integration. If you favour portability, you can just take the JVM then choose whichever language you please. If you favour depth of integration, your platform will often dictate the language. If you want both, implement the portable part on the JVM and go native for the rest.