| Author |
Groovy & Java
|
Mourouganandame Arunachalam
Ranch Hand
Joined: Oct 29, 2008
Posts: 395
|
|
Hi Jon,
Is there any areas that Groovy is stepping ahead or differs from Java? What are the key areas in Groovy that you like to highlight for the developers coming from Java background?
|
Mourougan
Open Source leads to Open Mind
|
 |
Jon Dickinson
Author
Ranch Hand
Joined: Feb 24, 2009
Posts: 45
|
|
Hi Mourougan,
Groovy is ahead of Java on language features. For example:
closuresmeta-programmingthe elvis operatorthe safe navigation operator
I believe Java is introducing at least the safe navigation operator in version 7, and of course there has been a debate raging within the Java community for a while over closures. Of course Groovy has the benefit of not having to support such an enormous user base, so they have probably had more freedom from the beginning. Java will take a while, and may indeed never catch up with some of these features.
The syntax for collections, such as Lists, Maps and ranges is also much less verbose in Groovy than Java.
Of course, I cover the basics of these features in Chapter 4 of my book!
Thanks,
Jon.
|
Jon Dickinson
Accolade Consulting
Grails 1.1 Web Application Development
|
 |
Mourouganandame Arunachalam
Ranch Hand
Joined: Oct 29, 2008
Posts: 395
|
|
|
Bunch of thanks for the details Jon ...
|
 |
 |
|
|
subject: Groovy & Java
|
|
|