Dear users, dear developers, and dear JSR participants,
We're glad to announce the release of groovy-1.0-jsr-01!
You can downlaod the distribution at the usual place:
http://groovy.codehaus.org/Download
That's not yet the final release obviously, but that's our first version which includes the new parser by default. We'll have a few jsr-x versions till this summer, two or three more before the final 1.0 release.
This new version contains many bug fixes, and the new parser implements a fair number of the decisions that have been taken as part of the JSR process for standardizing the Groovy scripting language.
We've prepared a page listing migration notes to follow to upgrade your own scripts to the new syntax. If you've got some migration problems, don't hesitate to contact us through the mailing lists.
http://groovy.codehaus.org/Migration+From+Classic+to+JSR+syntax
Notable changes
- Introduction of a def keyword
- Parameter separator in the closure syntax
- Safe navigation
- Property keyword
- Array creation
- float and double notation
- Explicit method pointer syntax
- No 'do ... while()' syntax
- 'No Dumb Expression' rule
- Strings and GStrings
- Assertions
- Integer division
- JDK5 for loop not supported
- Exclusive range
Some decisions haven't been yet implemented, such as:
- Markup and builders
- return/break/continue semantics in closures
But that will come in the next builds.
Apart from those important news, we've also fixed a lot of new bugs.
Here is the full list:
Bugs fixed
- GROOVY-105 Parent class print method is wrongly picked up
- GROOVY-369 prefix increment may need a higher precedence
- GROOVY-390 Closure cannot be used to invoke recursive function
- GROOVY-396 closure can't see script method
- GROOVY-427 Can't execute a command line where arguments have spaces in
them - GROOVY-460 improper parsing behavior or error message
- GROOVY-461 Compiler does not inforce the Java rules for definite
assignment before use - GROOVY-466 The print statement overrides parent print methods
- GROOVY-485 Method closures don't work for static methods
- GROOVY-521 Boolean constants don't support ".class" like Numbers do.
- GROOVY-523 ~/.groovy/lib doesn't work as advertised
- GROOVY-524 groovy has major problems loading classes
- GROOVY-543 Incorrect exception MissingMethodException when closure
references an uninitialized variable - GROOVY-674 println in closure has problem
- GROOVY-711 Antlr parser bugs in New Groovy
- GROOVY-755 Allow # as first character of a Groovy script
- GROOVY-766 Infinite Loop if the Last Line contains Single Line Comment
without Carriage Return. - GROOVY-767 groovysh does not work.
- GROOVY-768 divide 0 by any other number => groovy soils its breeches
- GROOVY-770 In some cases minus operator does not work with lists
- GROOVY-778 wrong CHECKCAST in bytecode for native arrays
- GROOVY-779 Type Checking Bypassed in Default Constructor
- GROOVY-788 Trailing comma should be supported in lists and maps
Improvement
- GROOVY-291 add new negate() methods to Number
- GROOVY-352 auto coerce List to Object[]
- GROOVY-771 Lexer should return Comments and Whitespaces when demanded
- GROOVY-785 Create a jar with its own namespace for dependencies
Additional notes:
- enabled the JSR parser by default in groovy-jsr-01 onwards
- moved JSR antlr parser into groovy-core
- migrated Console to the JSR syntax
- updated the test cases to use JSR parser syntax
- Added Unicode reader to JSR lexer
- BigDecimals with value 0 can have every scale, so a fix to the
rescaling was needed
- http://docs.codehaus.org/pages/viewpage.action?pageId=22019
- http://docs.codehaus.org/display/GroovyJSR/2005/04/01/grammar+notes
- Add string literal (and string constructor) format for regular
expression strings. Example: "football".replaceAll(/foo/, "Bar")
- new closure delimiter (single arrow) ->
- Incorporated http://tonicsystems.com/products/jarjar/ into building
the embeddable jar (groovy-all-x.jar)
- added default imports to java.lang, java.io, java.net, java.util
- allow coercion from List/array/collections to types like Point,
Color, Dimension. Dimension d = [1, 2]
- BNF available
- http://groovy.codehaus.org/jsr/spec/grammar/
- http://groovy.codehaus.org/jsr/spec/GroovyRecognizer.html
- http://groovy.codehaus.org/jsr/spec/GroovyLexer.html
Enjoy!
–
Guillaume Laforge
Groovy Project Manager
http://glaforge.free.fr/?catid=2