closure

Bengt Richter bokr at oz.net
Tue Mar 25 23:12:16 CET 2003


On Tue, 25 Mar 2003 18:11:29 GMT, "Max Khesin" <max at cNOvSisiPonAtecMh.com> wrote:

>
>"David Mertz" <mertz at gnosis.cx> wrote in message
>news:mailman.1048614147.28046.python-list at python.org...
>> closure-specific like a "closure" keyword, or special syntax... there
>> are threads here every once in a while where someone proposes such a
>> thing, but I think it is unlikely to happen.
>
>
>Thanks - my whole research started out from reading your articles on FP :).
>Q-n: what would the "closure" keyword add that a nested scope cannot
>accomplish?
>
To me, the question suggests that closures inevitably go with nested scopes,
which is not necessarily so (UIAM ;-) I.e., ISTM that nested scopes
in general (as opposed to Python's) don't necessarily require closures, unless
you allow references to nested function definitions to escape their enclosing
scope, and be used elsewhere (as Python does allow). Cf. Pascal?

Regards,
Bengt Richter




More information about the Python-list mailing list