Groovy and Powershell

I have started looking at the language Groovy.

Groovy starts with java as a base language. It is backwards compatible to Java and compiles to the same jvm instructions.

It takes some different design decisions to it’s parent language. Everything is public by default, supports operator overloading, and has thrown away much of Java’s verbosity.

Oddly enough it looks like a parallel between Powershell and C#.

Now Powershell is not a compiled language, but can run C# inline.

Groovy’s scripting shell is very restricted as to be for simple experimentation only.

Both languages have identical tricks when it comes to closures, parameter, and advanced string handling GStrings in groovy have an almost identical syntax to the Powershell equivalent.

This also means that both languages are good at hosting DSL’s since they both support the fundamental pieces needed to do this (minimal ceremony syntax and closures).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s