Thursday, May 14, 2009

Groovy is an "agile dynamic language for the Java Virtual Machine", with Java inspired syntax and capabilities but with additional dynamic features "inspired by languages like Python, Ruby and Smalltalk". Groovy has a Rails inspired web framework called Grails and aims to be the "JVM's defacto dynamic language", but faces stiff competition from both JRuby and Jython.

So if Groovy is a JVM language, what is it doing on .NET and the Dynamic Language Runtime?

Groovy/DLRRecently, Gavin Grover began adding theGroovy Language to Microsoft's dynamic language runtime. He's focusing on creating a full-featured syntactic skin using combinator parsers because that's what's most lacking in (J)Groovy. Groovy's syntax is the next generation in the C language family, aiming to bring self-referentiality to the language syntax.

I've just put the source code for beta-04 of Groovy-DLR 1.0 online, with some improvements, including evaluating code in separate files, and in-place comment lex-definitions. Time for a brief roadmap...

The roadmap then continues with a discussion of features that Gavin intends to add to Groovy. They don't seem to be specific to Groovy DLR, and in fact at the end of the blog entry he says:

One last thing...Oh yes, I almost forgot to mention, I'm not doing any of this in C#. I'm switching languages, back to the JVM, back to the (J)Groovy AST, to SCALA.

...

The resulting code will be called Groovier. It'll be Apache 2.0 licensed to encourage the (J)Groovy developers to copy it for bundling with Groovy. Groovier will be to Scala and the GrAST what the (J)Groovy Language is to Java and the JVM. Groovy is getting groovier and Groovier.

Although it isn't entirely clear it looks like Groovy DLR is still-born (a dead-end, deceased) and will see no future development unless someone else picks it up. Shame.

One comment buried in the middle of the entry is interesting:

Python uses indentation to group statements into blocks, C-syntax languages use curlies. Groovy will provide both techniques simultaneously, using symbol{:. When working, we'll abstract the technique to other lists in the syntax using symbols(:and[:. Groovy developers will have the choice of syntactic forms, even able to mix both styles together in the same portion of code, just like in natural language.

Indentation for block structure in Python is a stroke of genius and has already influenced languages like Haskell and F#. Nice to see it spreading further.