[Python-Dev] Let's just keep lambda (original) (raw)
Terry Reedy tjreedy at udel.edu
Sun Feb 5 20:01:58 CET 2006
- Previous message: [Python-Dev] Let's just *keep* lambda
- Next message: [Python-Dev] Let's just *keep* lambda
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Guido van Rossum" <guido at python.org> wrote in message news:ca471dc20602050943q5bad4d1ehadd9d3b653d8b4fb at mail.gmail.com...
After so many attempts to come up with an alternative for lambda, perhaps we should admit defeat. I've not had the time to follow the most recent rounds, but I propose that we keep lambda, so as to stop wasting everybody's talent and time on an impossible quest.
To me, there are two separate issues: the keyword and the syntax. I also have not been impressed by any of the numerous alternative syntaxes proposed over several years and just this morning was thinking something similar to the above.
But will you consider changing the keyword from the charged and overladen 'lambda' to something else? (See other post today.) I think this would cut at least half the fuss.
I base this on the following observation: generator expressions are to generator statement definitions much like function expressions are to function statement definitions. Both work when the payload yielded or returned is computed in a single expression. But I personally have not seen any complaints about the 'limitations of generator expressions' nor proposals to duplicate the generality of statement definitions by stuffing compound statement bodies within expressions.
But if we had called them generator lambdas, I suspect we would have.
Terry Jan Reedy
- Previous message: [Python-Dev] Let's just *keep* lambda
- Next message: [Python-Dev] Let's just *keep* lambda
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]