capturing (or not) mutable local variables
Alex Blewitt
alex.blewitt at gmail.com
Sun Nov 21 01:21:44 PST 2010
On 21 Nov 2010, at 02:08, Neal Gafter <neal at gafter.com> wrote:
> The point of my question is that mutable versus immutable has nothing to do
> with variable lifetime. Pretending they have anything to do with each other
> is just unnecessarily muddying the the discussion.
Except that this assumes it is the same variable inside and outside the lambda. If it is semantically a different variable (with the lifetime of the closure) which has been assigned a copy of the value from the enclosing scope then mutability, or lack thereof, is key.
>
Alex
More information about the lambda-dev
mailing list