On Apr 5, 2007, at 10:06 PM, Thomas Hicks wrote:

Speaking of Groovy....

Whatever happened to Warner's Groovy challenge? (see quote below)
Did anyone succeed in creating High Order Messaging in Groovy? (Warner?)

I *was* going to try and do it last weekend, but ran out of time. I've pulled it out again and was going to see if I could take another stab at it this weekend.


Not knowing Ruby, but skimming the given articles, it seems that the
first author was trying to accomplish several different things under the rubric of "Higher Order Messaging": high-order functions, extending the Ruby syntax, and automatically calling methods which did not exist before the call.

Groovy can do the first thing and has many built-in methods which take
closures as arguments (exs: each, findAll, inject). I don't know if it can
be extended to create/call methods which do not exist though since the
Ruby example apparently uses a special, built-in error mechanism
(method_missing) to intercept the errant call (hmmmm....I wonder if some
AOP code injection could accomplish this in other languages).

It definitely can do the "methods don't exist", it's part of what the Builders use for creating xml.

http://groovy.codehaus.org/Builders

-warner

        regards,
        -tom


At 05:12 PM 4/5/2007, Bill wrote:
Speaking for myself I wouldn't mind hearing more about Groovy. Maybe a Groovy jam session... :)

I note that Groovy has caught Rick's eye, or at least so a couple of months ago: http://www-03.ibm.com/developerworks/blogs/page/JEE? entry=i_am_ready_for_some&ca=drs-bl


At 03:08 PM 3/27/2007, Warner wrote:
Hi all,
James threw down the gauntlet yesterday with respect to doing this in
Groovy. I know it can be done, and I plan on working on this this
weekend just for fun. Here's the challenge:
http://legacyofthemob.se/istari/2006/10/08/higher-order-messaging- in- ruby/

I think that this would be a fun exercise (for those of us inclined
to do so and flex our coding muscles so to speak). Pick a language
(Scala, Haskell, Erlang, Groovy, Smalltalk, Objective-C, Lisp, anyone
up for Dylan?, etc.) and then post your findings either here, on the
wiki (if we get enough), or your blog. And I'm sure that Bill will
figure out a way to do this in Icon ;-).

BTW - I feel that it is this kind of language feature that makes it
easier to write an Internal DSL in a given language than on top of
something like Java.

-warner

Warner Onstine - Programmer/Author
New book! Tapestry 101 available at http://sourcebeat.com/books/ tapestrylive.html
[EMAIL PROTECTED]
http://warneronstine.com/blog




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Warner Onstine - Programmer/Author
New book! Tapestry 101 available at http://sourcebeat.com/books/ tapestrylive.html
[EMAIL PROTECTED]
http://warneronstine.com/blog




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to