From: Charles Oliver Nutter Date: 2008-03-26T10:28:57+09:00 Subject: Re: Pros and Cons of Ruby vs JRuby for GUI Robert Dober wrote: >> What are the pros and cons of *Ruby* vs *JRuby*? >> How far behind "regular" *Ruby* *JRuby* is? > Not behind at all, with the exceptions of continuations IIRC. Correct, though currently there's a bit of tail-chasing to get JRuby the last 1% of compatibility outside continuations since even in 1.8 patchlevels minor things occasionally change. But in general, we consider compatibility to be largely a done deal. >> Since *Ruby* is written in *C* and *JRuby* in *Java* isn't *Ruby* faster >> than *JRuby*? > Not necessarily, the C implementation is a na誰ve interpretation of the > AST, while Java byte code is highly optimized. > Ruby's dynamic nature takes many of these optimizations away, but > Charles has made incredible effort for speed. > They are about the same right now, but be aware that C-Ruby will not > get much faster while JRuby might still get some very large speedup. > Right Charles? I can't really speak for C Ruby, but JRuby certainly has a *lot* of open road ahead for optimization. We've only stopped actively working on performance lately because it's already looking great, and we wanted to stabilize the 1.1 release and start planning for better integration with Java classes and Ruby 1.9 features. >> Other than *swing* in *JRuby* is there any advantage of using *JRuby* >> over *Ruby? > Swing is all but an advantage, unless you have a really cool tool to > generate a Swing interface, it is APITN to write swing GUIS. > But very often JRuby is considered the backdoor entrance of Ruby into > a company that disallows the red gem the main entrance. If this does > not apply to you other advantages depend very much on your needs, GUIs > are known AFAIK. James Britt is right about MonkeyBars, it's a great way to leverage Swing without writing GUIs by hand. By and large I think hand-built GUIs of nontrivial size simply don't scale, so the MonkeyBars approach is the right way to go. And the Matisse Swing GUI editor in NetBeans is *excellent*. - Charlie