Groovy_programming_language Groovy_programming_language

Groovy programming language - Definition and Overview

In slang and informal language, Groovy refers to a fashionable or desirable quality, without necessarily specifying one. It can also be used as a generally positive exclamation. It originated in britain, and largely remains a british word.

It has slightly outdated connotations in recent times, although it can still be used in everyday speech. In computing, Groovy is an object-oriented programming language designed for the Java platform as an alternative to Java programming language with features from Python, Ruby and Smalltalk.

Groovy uses a Java-like syntax which is dynamically compiled to JVM bytecodes and that works seamlessly with other Java code and libraries. The Groovy compiler can be used as an alternative to javac to generate standard Java bytecode to be used by any Java project or it can be used dynamically as a scripting language.

Groovy is currently undergoing standardization through the Java Community Process [1] (http://www.jcp.org/en/jsr/detail?id=241).

Examples

Slang:

Groovy paintjob
Real groovy to see you baby!
Computing:

class Foo {
  doSomething() {
    data = ["name": "James", "location": "London"]
    for (e in data) {
      println("entry ${e.key} is ${e.value}")
    }
  }

  closureExample(collection) {
    collection.each { println("value ${it}") }
  }

  static void main(args) {
    values = [1, 2, 3, "abc"]
    foo = new Foo()
    foo.closureExample(values)
    foo.doSomething()
  }
}

External links


Example Usage of programming

Sixeight: Zen RT @yhara programming Zen
Geewiz: Sorry for the DrupalCamp flood yesterday. I've switched it to @freistil. Back to normal programming.
yhara: programming Zen
Copyright 2009 WordIQ.com - Privacy Policy  :: Terms of Use  :: Contact Us  :: About Us
This article is licensed under the GNU Free Documentation License. It uses material from the this Wikipedia article.