Re:Stop writing lambda expressions in Python
by sp332 on Thursday September 27, 2018 @04:37PM
(#18088377)
Guido van Rossum was explicitly against functional programming (well, in the Python language anyway). It's an imperative, object-oriented language that eventually threw functional programmers a bone with map, reduce, and filter, and that's about it.
[ Parent
| on HN ]
Re:Stop writing lambda expressions in Python
by eesmith on Thursday September 27, 2018 @06:05PM
(#18089211)
Could you elaborate further? I wasn't there then, but what you wrote doesn't agree with my understanding.
Lambda, map, reduce, and filter were part of the Python 1.0 release. The actual commit date was Tue Oct 26 17:58:25 1993 +0000:
commit 12d12c5faf4d770160b7975b54e8f9b12694e012
Author: Guido van Rossum <[email protected]>
Date: Tue Oct 26 17:58:25 1993 +0000
* compile.[ch]: support for lambda()
* PROTO.h, mymalloc.h: added #ifdefs for TURBOC and GNUC.
* allobjects.h: added #include "rangeobject.h"
* Grammar: added lambda_input; relaxed syntax for exec.
* bltinmodule.c: added bagof, map, reduce, lambda, xrange.
* tupleobject.[ch]: added resizetuple().
* rangeobject.[ch]: new object type to speed up range operations
(not convinced this is needed!!!)
You can see the commit had its doubts about xrange, but said nothing negative of the functional programming aspects.Van Rossum described that history at https://python-history.blogspot.com/2009/04/origins-of-pytho... . I don't see anything which sounds like "throwing a bone", much less being "explicitly against functional programming" when that discussion occurred.
My understanding is that he wasn't opposed to their inclusion initially but became negative towards them only years later.