The Groovy language is most directly related to Java. One key design consideration for Groovy was building it to integrate directly with the Java Runtime. In fact, any valid Java code is valid Groovy code. A Groovy application can also access the Java class library and third-party libraries. Even where the languages differ, the language implements these differences in a compatible way. An example is the cross compiling of a Groovy script into a Java class.
Groovy as a language does pull from other languages, however. These language elements include:
Groovy as a language does pull from other languages, however. These language elements include:
- Ruby
- Meta programming construct where a meta object is created for key objects providing runtime extension and introspection capabilities beyond what Java offers natively
- Range type as demonstrated in the select/case statement
- Python
- list/map literal notation
- syntax for default parameters
- Smalltalk
- collection processing methods
- collect and inject naming scheme
- Functional programming
- Closures came from the world of functional programming (function pointers)
No comments:
Post a Comment