Groovy@20110124004831

動的型言語。Python、Ruby や Smalltalk からいろいろな機能を取り入れ、Java風の構文に仕上げた。JVM のバイトコードにコンパイルできる。

>>
Examples 
Here's a simple example which demonstrates the basic syntax. Notice that Groovy is dynamically typed, has closure support and supports something similar to Python's tuple / sequence / dictionary support (List and Map in Java) 
>|groovy|
class Foo {
  public doSomething(){
    def data = [name: "James", location: "London"]
    for(e in data)
      println "property ${e.key} is ${e.value}"
  }
  
  static closureExample(collection) {
    collection.each{ println "value $it" }
  }
  
  static main(args){
    new Foo().doSomething()
    closureExample([1, 2, 3, "abc"])
  }
}
||<
<<