Groovy And Groovy++,Are they different?

不问归期 提交于 2020-01-01 07:41:44

问题


i recently came to know that groovy++ have been released, what is the major difference is in Groovy and Groovy++?


回答1:


From the groovy++ page http://code.google.com/p/groovypptest/

Groovy++ is statically typed extension of Groovy programming language. Additionally to all goodies of standard Groovy it adds a lot of functionality

  • compile time checking of code
  • as fast as Java performance of compiled code
  • easy mixing of statically and dynamically typed code
  • very powerful type inference
  • tail recursion traits (interfaces with default implementation)
  • extension methods (compile time categories)
  • standard library of utilities for functional programming, concurrency and distributed computing (early prototype stage)



回答2:


There is a good article on what Groovy++ brings to Groovy here. It includes benchmark results, so you can see the performance difference vs. Groovy and straight Java.




回答3:


Groovy++ is an extension to the core Groovy 1.x language. You drop the GroovyPP.jar file into the Groovy library directory, add @Typed in front of the package keyword in your code, then run your code just as you would in core Groovy. It infers the types, AND runs faster!



来源:https://stackoverflow.com/questions/5441482/groovy-and-groovy-are-they-different

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!