In article <[EMAIL PROTECTED]>, Roy Smith <[EMAIL PROTECTED]> wrote: >DH <[EMAIL PROTECTED]> wrote: >> -python has true closures (although nothing like ruby's blocks) > >What is a "true closure"? Or, maybe what I'm asking is what kind of >closure wouldn't be a true closure? Is there some kind of ersatz closure >other language try to pass off, in violation of truth in closure laws?
It's an apt question. What's a "true closure"? That's the easiest part, in some ways: Wikipedia, for example, tells that it's "a function that refers to free variables in its lexical context" <URL: http://en.wikipedia.org/wiki/Closure_%28computer_science%29 >, that is the context of the domain of the function's definition. Some languages--Lisp, but also many others--definitely have it. Basic definitely didn't. Tcl ... well, after weeks of discussion <URL: http://wiki.tcl.tk/closures >, the conclusion was that Tcl almost has as much as it can, given that "lexical context" just doesn't have much standing in Tclonia. So, yes, George Mikan and Allen Iverson both definitely played basketball, and well, but, at the same time, it's useful to distinguish the things they do with a ball. -- http://mail.python.org/mailman/listinfo/python-list