[Python-ideas] a new lambda syntax

Mike Meyer mwm-keyword-python.b4bdba at mired.org
Wed Oct 21 01:57:42 CEST 2009


On Tue, 20 Oct 2009 13:34:11 +0200
Masklinn <masklinn at masklinn.net> wrote:
> The biggest (by far) advantages I see to good anonymous functions  
> (note: Ruby's aren't, as far as I'm concerned, because due to their  
> nature they don't easily scale from 1/call to 2+/call) are in  
> flexibility, freedom of experimentation and possibility to keep the  
> core language itself small: had Python had "full-blown" anonymous  
> functions, it wouldn't have been necessary to add the `with` statement  
> to the language. It could just as well have been implemented through a  
> protocol or the stdlib, and people would have been free to toy with it  
> in their projects long before it was added to the core language.

Note that this is a two edged sword, in that all those people "toying"
with "with"-like constructs might also be publishing code using them,
meaning that instead of having one clean construct from the core
developers, we'd have to deal with an unknown number of variant idioms
from most anybody.

A small core language doesn't help a lot when you have to know four or
five different ways to build some basic construct because it's not in
the core language.

    <mike
-- 
Mike Meyer <mwm at mired.org>		http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org



More information about the Python-ideas mailing list