Re: some things about Closure

Jochen Theodorou <[email protected]> Wed, 15 Jul 2026 07:44:41 +0200
Newsgroups gmane.comp.lang.groovy.devel
Message-ID <[email protected]>

On 7/15/26 06:01, Paul King wrote:
[...]
> Dynamic packing
> stays annotation-only (@PackedClosures) regardless =E2=80=94 it cannot b=
e
> proven sound without types =E2=80=94 so the blast radius of any default =
is:
> statically compiled closures the compiler has proved safe, with the
> escape analysis already declining the risky shapes (field-assigned DSL
> blocks like Grails constraints never pack, by construction).

I think I missed something. cl =3D {x->x+1} cannot be a PackedClosure? I=
=20
am pretty sure there are a lot of cases for them. And the point I am=20
really missing is I guess: in what way are types a required deciding=20
factor of if something can be a PackedClosure or not?

bye Jochen