Re: Feedback request: Sealed classes

2021-07-31 Thread MG
Hi Paul, 1. A 100% continue with "...Groovy's goal of minimising boilerplate and not assuming its users need excessive hand holding" from my side, plz G-) 2. non-sealed: Hyphenated & negation keywords indeed seem like a poor choice to me, unless they are the counterpart to a

Re: Feedback request: Sealed classes

2021-07-31 Thread Guillaume Laforge
Hi Paul, On Sat, Jul 31, 2021 at 8:09 AM Paul King wrote: > [...] > Questions/Discussion points: > (1) The annotations would allow some or all of the initial change to > be backported to versions of Groovy (e.g. to a future 3.0.x or 3.1.x) > where the grammar change isn't made. Are we happy to

Feedback request: Sealed classes

2021-07-31 Thread Paul King
Hi folks, With JDK17 introducing sealed classes[1] (which has been in preview for JDK15/16), Groovy needs to at least properly handle such classes, i.e. as a minimum not allow such classes to be extended in Groovy. Otherwise, created classes will give an IncompatibleClassChangeError when loaded.