Python's Lisp heritage

Michael Gilfix mgilfix at eecs.tufts.edu
Sun Apr 21 13:31:51 EDT 2002


  I agree that functional support is a good thing. Why can't a
language include support for multiple programming paradigms? When
I first started using python, I was really pleasing that I
had a powerful OOP paradigm as well as functional primitives.
filter/reduce/map sometimes fit certain tasks in ways that iteration
can make combersome. When used appropriately, they express a task in a
much more complex yet /clearer/ way.

  Each pardigm has its advantages and disadvantages. Isn't the best
language one which allows you to emply the right tool in the right
situation?

                        -- Mike

On Sun, Apr 21 @ 02:32, James J. Besemer wrote:
> > They were added to Python just before the 1.0 release, as a contribution
> > by someone other than Guido.  He's noted for saying way back in 1994
> > ] To be honest, I wish I hadn't introduced lambda, map, filter and
> > ] reduce -- they support a style that is inconsistent with the rest of
> > ] Python. ...
> 
> That's disappointing to hear.  I thought including the ability to do some
> functional-style programming was a great thing.  Somebody else here or in one
> of the books I read recently I thought said support for functional programming
> was a good thing.
> 
> > BTW, the first two features are best done in modern Python using
> > list comprehensions and the f(*a, **kw) syntax.
> 
> "best" is a value judgment.  But it's true MAP could be defined as a user
> function and apply appears to serve no actual value I can discern.
> 
> Lambda however seems useful, judging by the number of times it seems to show up
> in code examples.

-- 
Michael Gilfix
mgilfix at eecs.tufts.edu

For my gpg public key:
http://www.eecs.tufts.edu/~mgilfix/contact.html





More information about the Python-list mailing list