Tuesday 16 October 2012

Groovy

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...

No comments:

Online Marketing
Add blog to our blog directory blog search directory Blog Directory Blogarama - The Blog Directory