What’s new in Groovy 1.5
http://www.infoq.com/articles/groovy-1.5-new
A couple of things I found are pretty cool.
- Annotation. Aha… getters and setters are gone! Actually that means we don’t auto-generate ourselves in IDE. And code becomes naturally concise and readable.
- Elvis operator. Compare piece of code below…
String name = "Guillaume"; String displayName = name != **null** ? name : "Unknown"; String name = "Guillaume" String displayName = name ?: "Unknown"