in reply to (tye)Re2: Closures and scope
in thread Closures and scope
Note that Perl agrees with me:
both closures are references to the same anonymous function.
Sorry, my mistake. The two different closures only managed to get the same address because their life spans did not cross (the first one was destroyed before the second one was created). If the first one had not been destroyed, then the second one would have gotten a different address.
This is a good thing and can be important in certain situations so I didn't want to leave this mistake uncorrected.
Thanks to Dominus for pointing this out to me.
- tye (but my friends call me "Tye")
|
|---|