Who's minister of propaganda this week?

Don Dwiggins dwig at advancedmp.net
Wed Mar 14 13:18:06 EST 2001


Paul Prescod writes:
B> The full depth of behaviors we should expect from a typeless language
>> have yet to be fathomed. Ruby trumps Python in the simple matter of
>> closures (imagine my shock when I discovered Python didn't have them). But
>> a language "like" those might win the decade.

> I don't know if you are serious (I mean closures are NOT that
> important!) but anyhow, Python 2.1 has nested scopes and I think that
> functions defined in those scopes are closures just like in any other
> language.

I'm relatively new to Python, and this is something I'm trying to get my
head around.  I know that closures (blocks) are extremely important in
Smalltalk (e.g., conditionals and looping are implemented entirely in terms
of blocks).  So, is this just an indication of Smalltalk's peculiarity, or
could Python benefit from the ability to exploit more robust closures in
something like the manner of Smalltalk?  For example, how about implementing
general iteration as something a container class does to a closure (as in
select:, detect:, inject:into:, etc.)?

-- 
Don Dwiggins                    "Solvitur Ambulando"
Advanced MP Technology
dwig at advancedmp.net





More information about the Python-list mailing list