FACTOID # 47: Danish workers strike 150 times more than their German neighbours.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RELATED ARTICLES
People who viewed "Groovy" also viewed:
RECENT ARTICLES
More Recent Articles »
 

FACTS & STATISTICS    Simple view

  1. Select countries to view: (hold down Control key and click to select several)

     

     

    Compare:

     

     

  1. Select fact or statistic: (* = graphable)

     

     

     

  2. (OPTIONAL) Compare to statistic: (both need to be graphable)

     

     

     

  3. View result as:

     

       
(OR) SEARCH ALL encyclopedia, stats & forums:   

Encyclopedia > Groovy
Look up groovy in Wiktionary, the free dictionary.

Groovy is an object-oriented programming language designed for the Java platform as an alternative to Java with features from Python, Ruby and Smalltalk. Wikipedia does not have an article with this exact name. ... Logo en:Wiktionary Wiktionary is a sister project to Wikipedia intended to be a free wiki dictionary (including thesaurus and lexicon) in every language. ... Object-oriented programming (OOP) is a computer programming paradigm in which a software system is modeled as a set of objects that interact with each other. ... A programming language or computer language is a standardized communication technique for expressing instructions to a computer. ... The Java platform is the name for a computing environment, or platform, from Sun Microsystems which can run applications developed using the Java programming language and set of development tools. ... Java is an object-oriented programming language developed initially by James Gosling and colleagues at Sun Microsystems. ... Python is an interpreted programming language created by Guido van Rossum in 1990. ... Ruby is a reflective, object-oriented programming language. ... Smalltalk is an object-oriented, dynamically typed, reflective, programming language designed at Xerox PARC by Alan Kay, Dan Ingalls, Ted Kaehler, Adele Goldberg, and others during the 1970s, influenced by Sketchpad and Simula. ...


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. Syntax, originating from the Greek words συν (syn, meaning co- or together) and τάξις (táxis, meaning sequence, order, arrangement), can be described as the study of the rules, or patterned relations that govern the way the words in a sentence come together. ... A Java Virtual Machine or JVM is a virtual machine that runs Java byte code. ... Byte-code is a sort of intermediate code that is more abstract than machine code. ... Illustration of an application which may use libvorbisfile. ... A diagram of the operation of a typical multi-language compiler. ... In computing, a Java compiler is a computer program that translates programs in Java to Java byte-code. ... Scripting languages (commonly called scripting programming languages or script languages) are computer programming languages initially designed for scripting the operations of a computer. ...


Groovy is currently undergoing standardization through the Java Community Process with the JSR 241. Standardization, in the context related to technologies and industries, is the process of establishing a technical standard among competing entities in a market, where this will bring benefits without hurting competition. ... The Java Community Process or JCP, established in 1995, is a formalized process which allows interested parties to be involved in the definition of future versions and features of the Java platform. ...


Groovy has a number of features not found in standard Java:

  • Dynamic "duck" typing
  • Native syntax for lists, maps, arrays, and regular expressions
  • Closures
  • Operator overloading

Examples

 class Foo { def doSomething() { def data = ["name": "James", "location": "London"] for (e in data) { println("entry ${e.key} is ${e.value}") } } def closureExample(collection) { collection.each { println("value ${it}") } } static void main(args) { def values = [1, 2, 3, "abc"] def foo = new Foo() foo.closureExample(values) foo.doSomething() } } 

Comparison between Java code and comparable Groovy code

JAVA:

 public class Filter { public static void main( String[] args ) { List list = java.util.Arrays.asList( "Rod", "James", "Chris" ); Filter filter = new Filter(); List shorts = filter.filterLongerThan( list, 4 ) for ( String item : shorts ) { System.out.println( item ); } } public List filterLongerThan( List list, int length ) { List result = new ArrayList(); for ( String item : list ) { if ( item.length() <= length ) { result.add( item ); } } return result; } } 

GROOVY:

 list = ["Rod", "James", "Chris"] shorts = list.findAll { it.size() <= 4 } shorts.each { println it } 

External links


  Results from FactBites:
 
Groovy programming language - Wikipedia, the free encyclopedia (289 words)
Groovy is an object-oriented programming language designed for the Java platform as an alternative to the 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 to generate standard Java bytecode to be used by any Java project or it can be used dynamically as a scripting language.
Debian -- groovy (227 words)
Groovy is an agile dynamic language for the JVM combining lots of great features from languages like Python, Ruby and Smalltalk and making them available to the Java developers using a Java-like syntax.
Groovy is designed to help you get things done on the Java platform in a quicker, more concise and fun way - bringing the power of Python and Ruby inside the Java platform.
Groovy can be used as an alternative compiler to javac to generate standard Java bytecode to be used by any Java project or it can be used dynamically as an alternative language such as for scripting Java objects, templating or writing unit test cases.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.