Circular refs
Tim Peters
tim_one at email.msn.com
Thu Sep 30 22:32:05 EDT 1999
[Tim]
> The prime thing that killed adopting lexical closures was the cyclic
> trash problem then, and Greg Ewing just bumped into that again
> recently in his implementation.
[Greg Himself]
> Er, my implementation is actually a *solution* to the
> cyclic trash problem.
1. That's nice.
2. "The cyclic trash problem" isn't limited to lexical closures.
3. At
http://www.cosc.canterbury.ac.nz/~greg/python/lexscope.html
I read (& still do <wink>):
It is still possible to create cycles if you're not careful. For
instance, storing a local function or the value of a lambda
expression in a local variable of a scope enclosing its definition
will create a cycle.
That's precisely the flavor of cycle that killed lexical closures 3 years
ago, as that's precisely the kind of thing the Scheme camp wants to do
routinely; avoiding cycles in closures with (merely) dynamic extent isn't a
problem for you now, and wasn't a problem for Guido then.
those-who-don't-remember-history-are-doomed-to-be-beat-over-the-
head-with-it<wink>-ly y'rs - tim
More information about the Python-list
mailing list