2008-11-11

Groovy is to Java like C++ is to C?

A nearly heretical thought entered my mind. C++ was a proper super set of C. I used to work in C from a C++ compiler for example and the advantage was that I had C with a little bit of syntax freedom. Like the ability to declare variables anywhere in a function. In fact I had forgotten that you couldn't declare variables just anywhere in C during an interview where the interviewer felt like he needed to really grill me on my knowledge of C.

It isn't hard for me to imagine then that Groovy is nearly a proper super-set of Java and is therefore similar in relationship to Java as C++ was to C.

With a little tweaking your tool chain could be set up to see things the same way. It could see Groovy as Java++. The change would aid adoption and aid in developer migration. In fact you can see here (in my own post) that you can write Groovy/Java and not really Groovy/Groovy. Props to Andres pointing out how I'm not really thinking in Groovy yet.

I'm sure I'm not the first person to have this thought but I thought I'd go ahead and voice it here since I've not read anyone else taking this point of view.