Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Groovy

Tags: groovy code java

As you can see in the previous post, lots of new programming languages are cropping up that will actually run "on" the JVM. In clear, this simply means the Code (groovy or whatever) is (pre-)compiled to Java-equivalent bytecode. Why do I say "Java-equivalent" because it may well be some things get optimized that wouldn't normally in Java. Why? Because optimization is often "pattern"-driven (not design pattern, just code pattern), which means languages that offer different constructs, may be able to optimize these in a way that Java cannot.
Cut a long story short... I am currently exploring Groovy, which is both a (pre-)compilable and scripting language. What's great about this, is that you can run along, code some Groovy on the command-line to check it's all working, create a *.groovy file you save to disk containing your logic, and run the file using groovyc for instance, the equivalent of javac for Java. What's really cool about the bytecode thing, is that it means you just take a piece of Groovy code, hand it to groovyc, then to the JVM. The JVM will basically handle it like any old plain piece of Java. So what's the point? might you ask. Groovy offers lots of very handy constructs, working with lists or XML for intance is a breeze, so try it and erm... let me know what you think. Personnaly I am pretty enthusiastic about it :-).

Thoughts?

PS: I nearly forgot... remember to "groovydoc", if you choose to walk that path...



This post first appeared on The Blog That Refused To Throw NPE, please read the originial post: here

Share the post

Groovy

×

Subscribe to The Blog That Refused To Throw Npe

Get updates delivered right to your inbox!

Thank you for your subscription

×