The Artima Developer Community
Sponsored Link

Java Community News
Groovy Release Candidate 1.0 Posted

3 replies on 1 page. Most recent reply: Dec 11, 2006 10:57 AM by David Medlock

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 3 replies on 1 page
Frank Sommers

Posts: 2642
Nickname: fsommers
Registered: Jan, 2002

Groovy Release Candidate 1.0 Posted Posted: Dec 6, 2006 8:20 AM
Reply to this message Reply
Summary
The Groovy project posted Release Candidate 1.0, with plans for a final release before the end of the month. RC 1.0 features a reworked Meta-Object Protocol, an improved and customizable type coercion mechanism, support for "in" as a boolean operator, move to a new syntax in closure notation, and over a hundred smaller improvements.
Advertisement

Groovy, the object-oriented scripting language for the JVM, was the first non-Java language to be officially supported in the Java Community Process, as JSR 241. Since it's inception, the language itself, as well as its implementation, has gone through significant revisions. This week, the Groovy project posted Release Candidate 1.0, with plans for a final 1.0 release before the end of the month.

One of the most significant changes in RC 1 is a new Meta-Object Protocol (MOP) that determines how methods are dispatched by the Groovy interpreter. Groovy's MOP, in effect, allows users to add and alter Groovy language constructs in order to customize the behavior of Groovy programs.

Groovy project lead Guillaume Laforge noted that,

This release contains a re-implemented and reworked Meta-Object Protocol, which is the core of Groovy's runtime system which decides how the dispatch of method calls, [and how] property and attribute access works. This new MOP brings more flexibility and a finer-grained control of those mechanisms.

Laforge also noted changes in Groovy's type coercion mechanism:

Among the interesting improvements, you'll note that coercion mechanisms are improved and now customizable for your own POGOs through the asType(Class) method. You can even coerce Maps to interfaces, as well as Closures to single-method interfaces.

Another new feature is full-fledged support for the in keyword as a boolean operator to support syntax such as:

if (5 in 0..10) { ... }

6 in 1..12 ? "yes" : "no"

Support for Groovy's old, pre-JSR closure syntax was discontinued in the 1.0 RC. Instead of specifying closures with syntax such as {|} and {||}, closures are now defined with code such as def cl = {a -> ...}.

In addition to those major changes, the 1.0 Release Candidate includes over a hundred minor enhancements and bug fixes, according to Laforge.

With a stable 1.0 release approaching, what role do you see Groovy play in your enterprise projects?


kate rhodes

Posts: 2
Nickname: masukomi
Registered: Dec, 2006

Re: Groovy Release Candidate 1.0 Posted Posted: Dec 7, 2006 8:49 AM
Reply to this message Reply
>One of the most significant changes in RC 1 is a new Meta-Object Protocol (MOP) that determines how methods are dispatched by the Ruby interpreter.

Please tell me that was a typo. You meant Groovy interpreter right?

Frank Sommers

Posts: 2642
Nickname: fsommers
Registered: Jan, 2002

Re: Groovy Release Candidate 1.0 Posted Posted: Dec 7, 2006 9:22 AM
Reply to this message Reply
> >One of the most significant changes in RC 1 is a new
> Meta-Object Protocol (MOP) that determines how methods are
> dispatched by the Ruby interpreter.
>
> Please tell me that was a typo. You meant Groovy
> interpreter right?

Indeed. Thanks for pointing it out. We corrected that now.

David Medlock

Posts: 11
Nickname: dmedlock
Registered: Jun, 2006

Re: Groovy Release Candidate 1.0 Posted Posted: Dec 11, 2006 10:57 AM
Reply to this message Reply
Its a shame much criticism has been heaped on Groovy(the project and the language) in the past.

It has a very nice syntax which makes excellent use of closures in the familiar brace enclosed syntax.

I wrote a web framework which used velocity for the view yet needed a scripting language for the controller and possible the data modeling.

I looked at several options and settled on Groovy(JSR-02 release at the time). Its access to Java libraries, clean API, straightforward JDBC, and very nice expandability made it a great choice I haven't regretted.

Making a new command like:

foo(bar,100) { baz(); }

is childs play. You simply cannot downplay this kind of flexibility.

We certainly have room for more than one scripting language. Here is hoping the community wholeheartedly accepts Groovy.

Flat View: This topic has 3 replies on 1 page
Topic: Management and Monitoring Features of Java SE 6 Previous Topic   Next Topic Topic: Sun Releases Java SE 6

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use