From: MonkeeSage Date: 2007-11-28T06:30:01+09:00 Subject: Re: "Why I Program In Ruby (And Maybe Why You Shouldn't)" On Nov 27, 2:59 pm, MenTaLguY wrote: > On Wed, 28 Nov 2007 05:30:06 +0900, MonkeeSage wrote: > >> UIManager.look_and_feel = UIManager.system_look_and_feel_class_name > > > I like how the setter is automatically initialized. :) > > There are a lot of niceties to JRuby's Java integration -- for > example, a method called #isSomePredicate is also accessible as > #some_predicate?, and (at least in 1.1) you can use a Ruby block > in lieu of a terminal argument whose type is any single-method > interface (e.g. Runnable). Java collections also implement > Ruby enumerable and so on. > > Not that there aren't rough spots to work out yet, but we're > making a concerted effort to have Java libraries feel as "Ruby" as > possible. > > -mental A bit off-topic, but how does JRuby resolve that (i.e., the convenience method resolution)? It is some AST magic, or something as mundane as splitting camel-cased indentifier strings? (not to knock the latter; if it works, it works). I'll have to digg into JRuby againt next weekend. It's been three or four months since I last had a gander. :) "Keep on keepin' on"-in, Jordan