groovy 语言入门
源博客:http://www.cnblogs.com/amosli/p/3970810.html
1、groovy简介
其官方介绍为,Groovy...
-
is an agile and dynamic language(动态语言)or the Java Virtual Machine
-
builds upon the strengths of Java but has additional power features inspired by languages like Python, Ruby and Smalltalk
-
makes modern programming features available to Java developers with almost-zero learning curve
-
provides the ability to statically type check and statically compile your code for robustness and performance
-
supports Domain-Specific Languages and other compact syntax so your code becomes easy to read and maintain
-
makes writing shell and build scripts easy with its powerful processing primitives, OO abilities and an Ant DSL
-
increases developer productivity by reducing scaffolding code when developing web, GUI, database or console applications
-
simplifies testing by supporting unit testing and mocking out-of-the-box
-
seamlessly integrates with all existing Java classes and libraries
-
compiles straight to Java bytecode so you can use it anywhere you can use Java
简单说来:Groovy是一种运行在JVM上的动态语言,它吸取了Python,Ruby和Smalltalk等语言的优点,在Java语言的基础之上增加了许多特色功能;对于Java开发人员来说掌握Groovy是没有什么太大障碍的;相比 Java 而言,语法更易懂,更易上手,更易调试;无缝的集成了Java 的类和库;编译后的.groovy也是以class的形式出现的。
语法是相当的松散