Re: Fate of lambda, Functional Programming in Python...
From: Peter Kleiweg (in.aqua.scribis_at_nl.invalid)
Date: 08/20/04
- Next message: Marek Baczyński: "Re: Fate of lambda, Functional Programming in Python..."
- Previous message: William Park: "Re: Newbie to XML in Python"
- In reply to: Anthony Baxter: "Re: Fate of lambda, Functional Programming in Python..."
- Next in thread: Hans Nowak: "Re: Fate of lambda, Functional Programming in Python..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 20 Aug 2004 23:23:32 +0200
Anthony Baxter schreef:
> On Fri, 20 Aug 2004 12:50:02 -0400, Chas Emerick <cemerick@snowtide.com> wrote:
> > In a comment off a post on lambda-the-ultimate, I noticed this little
> > offhand remark:
> >
> > '''IIRC GvR is going to kill the various lambda, map,filter & reduce
> > leaving just generator expressions/list comprehension.'''
>
> First point: lambda, map, filter and reduce won't go away before Python 3.0,
> at the very least. And, to be honest, I suspect map/filter/reduce are much more
> likely to die than lambda, as they can nearly always be expressed more clearly
> as listcomps or genexprs.
The Python Cookbook, recipe 1.8, "Finding the Intersection of
Two Dictionaries" shows different methods of doing this
particular thing, among them list comprehension and filter.
Here, using filter is the fastest of all.
Why would you want to do away with something that is useful?
> Having said that, and donning my interpreting-Guido-hat, the major problem
> with lambda is the scoping issue. Nested scopes make this less of a problem.
> In addition, the name 'lambda' was a poor poor choice.
The choice is perfectly logical.
-- Peter Kleiweg L:NL,af,da,de,en,ia,nds,no,sv,(fr,it) S:NL,de,en,(da,ia) info: http://www.let.rug.nl/~kleiweg/ls.html The Halloween Documents: http://www.opensource.org/halloween/
- Next message: Marek Baczyński: "Re: Fate of lambda, Functional Programming in Python..."
- Previous message: William Park: "Re: Newbie to XML in Python"
- In reply to: Anthony Baxter: "Re: Fate of lambda, Functional Programming in Python..."
- Next in thread: Hans Nowak: "Re: Fate of lambda, Functional Programming in Python..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|