Groovy is a nice, easy-to-write script and easy-to-use Java "knockoff" - and I don't mean this digression. while Java is the language that must be compiled, deployed, and (often) run on corporate servers where performance matters, Groovy is the language in which you can quickly create a program to do something. Often, something is pretty simple, so it's an hour or a day of coding effort. Often, code is run only once and then discarded. Since Java has more templates and formalism, you can make this program faster and therefore more efficient in Groovy.
However, to give you some perspective, Groovy is a relative novice stomping on peat other other better established scripting languages:
Perl is one of the grandfathers of scripting languages; rarely, a Unix server is installed without Perl on it, and Perl scripts are the lifeblood of many servers. However, Perl is a write-only language that looks like linear noise to the uninitiated. There is more than one way to do everything, so the styles diverge radically. Perl coding tends to be a bit messy.
Python is a more recent, cleaner scripting language than Perl, and today it is preferred by many scripting languages. It is fun to program, it does everything, and because it has been for several years, many people know this. Python is behind / inside a number of Linux system utilities.
Groovy leaves Perl and Python in the dust when (a) the environment already uses the JVM and / or there is a requirement to use existing Java code, including libraries. So far, so good. Groovy is not incredibly fast, but faster than Python. Being dynamically typed, it is “fun” and “easy” to program in such a way that Java is not.
But then came Scala. Scala is like Java on steroids. It is statically typed, so it’s not really “fun” to program like Groovy, but it has type inference so often that you can omit types and the compiler can figure them out. Scala works very hard to make the most of types; it makes generic types much smoother than Java. It does not use many Java patterns, so Scala programs are usually 30% shorter than similar Java programs. Scala runs on the JVM and interacts quite well with Java code. It also runs as fast as Java, which most other languages do not.
Finally, in historical order, Clojure. Clojure is a derivative of Lisp, so it has a programming style that is very different from the languages you would know, and it burns a lot of parentheses! But Clojure runs on the JVM, is very compatible with the rest of Java, and is dynamically typed. You can use it as a scripting language or consider it as a compiled language ... it is up to you. I am very interested in programming, and the fact that it is an almost pure functional language makes you think in a new way about programming. At first you have a headache, but if you survive this very useful exercise, because you will learn some methods that will become more relevant (I think) in future programming.
All in all, this is likely to benefit you (attach chest hair if I can be sexist) to learn one or more of these “alternative” / “scripting” languages. You may find them useful. Usually, when something quickly breaks into my project, I get a job because all my colleagues know only Java, and by the time they finish setting up their class structure, I already did.
Carl Smotricz
source share