I was visiting Groovy Download page for Groovy 2.4.8 and I finished reading about Groovy Indy; Groovy Invoke Dynamic Support.
Since Groovy 2.0, we added support for the JVM invoke dynamic instruction. This instruction is supported since Java 7 and is a new bytecode instruction in the JVM that allows easier implementation of dynamic languages. This instruction is used internally, by the JVM, for the lambda support in Java 8.
Apparently, older jdk7s had a lot of bugs, and it is one of the reasons why Groovy Indy is not the default yet. Maybe in Groovy 3.
@cedricchampeau shows a build.gradle file configured to use Groovy Indy.
people wanting to test a Groovy runtime that uses invokedynamic have two things to do:
- use the groovy-indy jar which includes support for invokedynamic
- compile classes with the -indy flag
Moreover, the post explains how you can leverage Groovy to test the invokedynamic API by yourself. That part is a bit hardcore, though.
One of the most important persons in Groovy's development throughout the years is @JochenTheodorou. He keeps a low profile. That it is probably the reason why most of you would not know him and why he does not get all the recognition he deserves.
This linked post sheds a light on Jochen's personality. Sometimes, we forget there are human beings behind the technology pieces we use and love every day.
Please, frame this post in April 2015, the time Pivotal abandoned Groovy.
Note: late 2015 Jochen joined Canoo's Groovy stellar Team.