Lisp-likeness

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Wed Mar 16 13:26:59 CET 2005


"Carl Banks" <invalidemail at aerojockey.com> writes:

>> BTW, the fact that a closure refers to a variable itself rather to
>> its current value can be used to check the true attitude of
>> languages with respect to functional programming, by observing how
>> they understand their basic loops :-)

> Closing on a value rather than a variable would have been a lot easier
> to implement.

To be clear: closing on the variable is the only sane choice. Closing
on its current value would be inconsistent with global variables and
no language does this.

The issue is about the semantics of loops: whether they introduce
a new variable for each iteration, or change the value of a single
variable.

-- 
   __("<         Marcin Kowalczyk
   \__/       qrczak at knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/



More information about the Python-list mailing list