Wednesday, April 18, 2007

Neal Ford: "I would rather write Groovy code in VI than Java code in IDEA"

Interesting and entertaining interview with Neal Ford of ThoughtWorks fame. He has lots of nice things to say about Groovy and Ruby.

The only point I disagree with is his assertion that in Groovy you can only do 80% of what you can do in Ruby in terms of DSL programming. I've never seen a Ruby DSL that couldn't be done in Groovy with a similar conciseness in the syntax. It would be nice if Neal could elaborate on this point.

5 comments:

Neal Ford said...

Actually, I show exactly that in my No Fluff, Just Stuff presentation this year on "Building DSLs in Static and Dynamically Typed Languages". Once you get to the far edge of what you can do with syntax, Groovy is still hampered by its interaction with Java. Unless I'm missing something, you can't do a true open class on an existing Java class (like Integer) without a category (i.e., you can't use an Expando for that). That means you have to have the Category closure block around something like this (which is one of the DSLs I show in my talk):

2.days.from.today.at(4.pm)

which needs an Integer open class. Also, Groovy limits you with property vs. method calling semantics. You can also do lots of meta-programming tricks in Ruby that simply aren't possible (yet) in Groovy (like creating stateful method attributes). There's going to be a lot of this stuff in the book I'm working on with co-authors on building DSLs in Ruby.

Believe me, I'm not casting stones at Groovy. I love it! It's the best way to code the JVM. But, it was never designed to be as flexible as Ruby.

Graeme Rocher said...

Actually you can do that. It just isn't in Groovy core at the moment, but will be in 1.1. I implemented it for Grails and it is being migraded to Groovy for 1.1. It is called ExpandoMetaClass. Take a look here:

http://graemerocher.blogspot.com/2007/02/grails-041-out-groovy-just-got-more.html

Nevertheless, I await your book on Ruby DSLs, but I still maintain my stance: I have never seen a Ruby DSL that cannot be done in Groovy.

Anonymous said...

black mold exposure,
black mold symptoms of exposure,

wrought iron garden gates,
your nest iron garden gates, here,

hair styles for fine thin hair,
search hair styles for fine thin hair,

night vision binoculars,
buy, night vision binoculars,

lipitor reactions,
lipitor reactions,


luxury beach resort in the philippines,
beach resort in the philippines,

homeopathy for baby eczema.,
homeopathy for baby eczema.,

save big with great mineral makeup bargains,
companies marketing mineral makeups,

prodam iphone praha,
Apple prodam iphone praha,

iphone clone cect manual,
manual for iphone clone cect,

fero 52 binoculars night vision,
fero 52 night vision,

best night vision binoculars,
buy, best night vision binoculars,

computer programs to make photo albums,
computer programs, make photo albums,

Anonymous said...

it is cool.

Anonymous said...

I am so happy to get some Atlantica online Gold and the Atlantica Gold is given by my close friend
who tells me that the Atlantica online money is the basis to enter into the game. Therefore, I should buy Atlantica online Gold with the spare money and I gain some cheap Atlantica online Gold from other players.