Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Ola Bini says: Don't Say Groovy is Like Java

DZone's Guide to

Ola Bini says: Don't Say Groovy is Like Java

· Java Zone
Free Resource

Bitbucket is for the code that takes us to Mars, decodes the human genome, or drives your next car. What will your code do? Get started with Bitbucket today, it's free.

On Ola Bini's blog you'll find this:

If you're building an application and chooses to use Groovy for this instead of Java, isn't the reason that you're doing that the fact that you expect Groovy to give you something Java does not? And if that's the case, doesn't it sound like a disservice to people picking up Groovy to say that they can begin by just programming Java. There is no gain here.

Ola thinks that beginning Groovy users hear "Groovy IS Java" when someone says "Groovy is like Java". Ola thinks they filter out the word like. If this is true then we should indeed be careful. But, ... I don't think beginning Groovy users do this.

When I say "Groovy is like Java" I mean:

  • Groovy compiles to Java byte-code
  • A lot of Java statements work in Groovy too
  • Groovy classes can be called from Java (including application or framework classes)
  • Any existing Java class can be used in Groovy in at least the same ways as it can be used in Java
  • Groovy classes can be debugged by the existing debuggers in Java IDEs, together with Java code (work in ongoing to support this in NetBeans IDE too)
  • Groovy and Java source code can be compiled together so that Java classes and Groovy classes in the same code base can depend on each other
  • Groovy is a dynamic language on the JVM that has tons of features to discover

New Groovy users are attracted because Groovy is like Java. It remains true enough to Java to be comfortable yet is different enough to be interesting. Groovy and Java form the perfect couple. You can combine Groovy and Java code in anyway way you want.

Why would Ola Bini think new Groovy users filter out the word like anyway?

Happy coding!

Are you using Bitbucket to accomplish your company's mission? Share your company’s mission with #Forthecode for a chance to be featured on our homepage, our social media channels, or win a free t-shirt!

Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}