Chris Angelico wrote:
Also, all variables in the frame referenced by the lambda will be kept around, even if just a single one is actually used in the lambda.
This, however, could be changed - it's a simple question of optimization, so it comes down to "is it worth it". There's no semantic change there, AFAIK.
I'd expect a good optimiser to spot this and to optimise accordingly.