On 9/18/26 02:27, Paul King wrote:
[...]
In Groovy 7, we plan to look at
GEP-19 (more advanced switch pattern matching), so some of the JDK21
work in that space (like having MatchException and SwitchBootstraps)
would be really beneficial. I propose bumping the minimum to 21 for
that reason. I don't know of any JDK 25 features we need just yet, but
if we find any, we can always bump the minimum again later.
I struggle with the purpose of MatchException. And does it have to be
MatchException? The use cases are unclear to me right now.
The SwitchBootstraps are also questionable from my point of view. Their
idea is good, I do not question that part. But can we use exactly these
bootstrap methods? As far as I understood it they are specific to the
Java defined semantics on how a switch is supposed to operate. We have
"isCase" for this. And while they basically try to solve a slightly
different problem, I see a potential clash with Groovy semantics here
even in static compilation. And we probably have to rework some things
here.
So frankly bumping to 21 seems to be too early for me.
bye Jochen