File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to Make Groovy Apps Java-compliant

 
Freddy Wong
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From this thread
http://www.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?
 
Alaa Nassef
Ranch Hand
Posts: 471
Hibernate Mac OS X Spring
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, understood
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic