• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to Make Groovy Apps Java-compliant

 
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From this thread
https://coderanch.com/t/456/Groovy/sell-Groovy-Java-shop
Jim mentioned that all existing Java code will run as Groovy but the reverse isn't true.
Is there some specific guidelines/conventions that we need to follow in order to make Groovy applications Java-complaint?
 
Ranch Hand
Posts: 471
Mac OS X Hibernate Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I believe that what Jim meant is this. If you take code written in java syntax and put it in a groovy file, it will work, but if you take code written in groovy syntax and put it in a java file, it won't work. Jim was talking about the reason why some companies do not want to use groovy, since they look at it as a foreign language, and that if it doesn't do well, and there are no resources that know groovy, maintaining the code will be a hell. He also commented that this is not entirely true, since the syntax is quiet easy, and that it's going to be easy to pick up.
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yup. Also I don't think it would be desirable to try to write Groovy that is fully compilable as Java - if you do that, then you're just writing Java, and what point was there to using Groovy in the first place? Well, I suppose you can still use the various Groovy classes, and that's something. But without using Groovy syntax, you're really missing out on the simplicity and brevity that are a main part of the point of the language.
 
Freddy Wong
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK, understood
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic