map/filter/reduce/lambda opinions and background unscientific mini-survey
David Abrahams
dave at boost-consulting.com
Wed Jul 6 19:45:10 EDT 2005
Bruno Desthuilliers <bdesth.quelquechose at free.quelquepart.fr> writes:
> I discovered FP with David Mertz's papers about FP in Python. I had
> never read nor write a line of lisp, scheme, haskell, caml etc before.
> And I'd certainly start thinking of choosing another MYFL if anonymous
> functions where to disappear from Python. Note that I said "anonymous
> functions", not "lambda". Concerning map, filter, reduce etc, these
> functions can live in a separate module, and this wouldn't bother me.
> But anonymous functions are part of the language syntax, so there is no
> work-around.
Actually I'm pretty sure there is. It should be possible to
re-implement the Boost Lambda library in Python:
http://www.boost.org/libs/lambda
Compared with in-language lambda support it would have the advantage
of brevity and clarity for very small functions, but there are lots of
disadvantages, too. I wonder how Guido would feel if people started
using a (relatively) slow library solution with odd warts as a
consequence of dropping real lambdas.
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
More information about the Python-list
mailing list