Greg Ewing wrote: > Nick Coghlan wrote: > >> By 'current namespace' I really do mean locals() - the cell objects >> themselves >> would be local variables from the point of view of the currently >> executing code. > > This is wrong. Cells are *parameters* implicitly passed > in by the calling function. They may temporarily be > referenced from the current scope, but their "home" > has to be in an outer scope, otherwise they won't > survive between calls. As far as I'm aware, the cell objects get kept alive by the references to them from the closure attribute of the inner function. The actual execution frame of the outer function still goes away. The cell values persist because the function object persists between calls - it's only the execution frame that gets reinitialised every time. However, I'm now clearer on the fact that Guido's main interest is in true once-per-process semantics for case expressions, which changes the design goals I was working towards. So I think I'll try to take a break from this discussion, and let ideas percolate in the back of my head for a while :) Cheers, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia --------------------------------------------------------------- http://www.boredomandlaziness.org
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4