I found these tickets a few weeks ago and they explained why the Go developers haven't yet made this change.
The goal is not to GC stack frames. But I'm not sure why the didn't create an inner class to hold the closed-over variables in non-final fields (moving them from the stack to the heap) for both the function and all closures it creates.
(Obligatory "doctor, it hurts when I use mutable state!")
Nitpick, but saying copies in Java can get confusing. Both primitives and references are bound by value. I'm sure you know, but for others: no objects are copied.
I always found this limitation had reassuring regularity; it's the same way arguments are bound to function parameters (minus bring final). Local variables being isolated from "other scopes" means that any interthread communication must be mediated through objects.
Android Java is the one making use of anonymous inner classes instead.
[0]: https://github.com/frohoff/jdk8u-jdk/blob/master/src/share/c...
Not really, because the class file with invokedynamic bytecodes is supposed to work across all JVM implementations.
Hotspot's just happens to spin an inner class at runtime.
I believe this is it.