InfoQ Homepage Presentations Groovy: Best Practices Developed From Distributed Polyglot Programming
Groovy: Best Practices Developed From Distributed Polyglot Programming
Summary
Jonathan Felch discusses Groovy starting with its initial manifesto, its major features, language’s capabilities from a financial perspective and lessons learned in an actual project, Groovy’s main dynamic and meta-programming features and the power of using them together, ending with a look at what is not so great or not working as it is supposed in Groovy.
Bio
Jonathan Felch has worked as a programmer, a project manager, an enterprise architect, a high-tech venture capitalist, a desk quant for quantitative trading strategies for companies like Credit Suisse, Lehman Brothers, Paloma Partners, and NASDAQ. Currently, he is Quantitative Portfolio Manager at E. H. Smith Jacobs.
About the conference
QCon is a conference that is organized by the community, for the community.The result is a high quality conference experience where a tremendous amount of attention and investment has gone into having the best content on the most important topics presented by the leaders in our community.QCon is designed with the technical depth and enterprise focus of interest to technical team leads, architects, and project managers.
Community comments
About Groovy Gotchas
by Sargis Harutyunyan,
Avoid list.each{}, prefer for (a in list)
by Olivier Gourment,
About Groovy Gotchas
by Sargis Harutyunyan,
Your message is awaiting moderation. Thank you for participating in the discussion.
I tried for Groovy 1.7.3(GroovyConsole) and have following:
class Name {
String id = "Sargis"
}
def name = new Name()
println name.id
println name.getId()
println name['id']
def c = 1
println c.getClass().getName()
def b = 1.1
println b.getClass().getName()
def a = 1.1d
println a.getClass().getName()
============================================================================
Output
groovy> class Name {
groovy> String id = "Sargis"
groovy> }
groovy> def name = new Name()
groovy> println name.id
groovy> println name.getId()
groovy> println name['id']
groovy> def c = 1
groovy> println c.getClass().getName()
groovy> def b = 1.1
groovy> println b.getClass().getName()
groovy> def a = 1.1d
groovy> println a.getClass().getName()
Sargis
Sargis
Sargis
java.lang.Integer
java.math.BigDecimal
java.lang.Double
seems everything is ok
Avoid list.each{}, prefer for (a in list)
by Olivier Gourment,
Your message is awaiting moderation. Thank you for participating in the discussion.
Good tip, thanks Jonathan!