5 ms·
> Rossum, the inventor of Python, hates Lisp, but he was dragged kicking and screaming to lambda I'm not sure that's true, anyone have more details? Most peop
by mixmastamyk 11y ago
> Rossum, the inventor of Python, hates Lisp, but he was dragged kicking and screaming to lambda
I'm not sure that's true, anyone have more details? Most people don't like the parens everywhere with lisp, but otherwise speak of it highly.
Edit: thanks for the links on lambda, read all of them. However, didn't see anything obvious written about lisp itself.
- oconnor663 11y agoThis looks like Guido's version of the story: http://python-history.blogspot.com/2009/04/origins-of-pythons-functional-features.html http://python-history.blogspot.com/2009/04/origins-of-python...
- tikhonj 11y ago"Kicking and screaming", to be fair, is a bit of a literary exaggeration. But Rossum did not particularly want to add functional features to the language and only did so at the behest of his users. Lambda as well as map/filter/reduce were "a significant, early chunk of contributed code", not something he intended the language to have from the outset[1]. More recently, he has been trying to deemphasize these features in favor of list comprehensions. Moreover, Rossum is opposed to proper tail calls and even recursion in general[2]. He also doesn't like folds, and generally thinks you should just express that sort of logic as some sort of loop. (I forget exactly where I read that opinion, but it could easily have been [1].) He's a staunchly imperative programmer, and the design of Python shows this off consistently except for an initial accident of first-class functions and closures (of a sort)—a design he likes because it enabled other, non-functional language features like new-style classes. "Kicking and screaming" might have been an exaggeration, but it captures his overall attitude towards functional programming pretty well. [1]: http://python-history.blogspot.com/2009/04/origins-of-pythons-functional-features.html http://python-history.blogspot.com/2009/04/origins-of-python... [2]: http://neopythonic.blogspot.com/2009/04/tail-recursion-elimination.html http://neopythonic.blogspot.com/2009/04/tail-recursion-elimi...
- setheron 11y agoI just can't understand anyone who is black and white. I like when I have both tools at my disposal: recursion and iteration.
- hueving 11y agowhen you have a project concerned with readability, adding new features is a huge community cost in the long run because it's one more thing you have to learn to deal with as you go across projects. One of the wonderful things with python is that you can dig into the code of most python projects and not have to worry much about completely different idioms requiring a complete context switch to understand how they work. He is not really being black and white, he is doing a service by preventing language bloat ala C++ as much as possible.
- mhd 11y agoIt always struck me as a reaction against Perl's "Tim Toady" approach, encouraging a more idiomatic and unified programming strategy to ease comprehension and teaching (IIRC the origin of Python, or at least ABC).
- sklogic 11y agoThis is exactly what makes Python a bad language. Lack of expressive power results in an unnecessary complexity of the code. It's much easier to comprehend a short, compact code written in the familiar, domain-specific idioms rather than digging through convoluted pile of low-level leaky idioms like loops, list comprehensions, generators, classes, recursion and all that irrelevant crap.
- afc 11y agoJust wanted to add my voice: this matches exactly my perception. I used to really like Python, but I've come to the conclusion that there's a certain point in terms of the complexity of a Python program where everything just blows up and it's next to impossible to keep it from becoming a tangled mess. This point is reached incredibly soon, something like five classes with some inheritance, some interface/virtual/abstract class. Ugh. Now I avoid Python as much as possible, much preferring C++ or Java, which I think work incredibly better for larger programs.
- dalke 11y agoLambda entered Python in 1993: changeset: 1369:89e1e5d9ccbf branch: legacy-trunk user: Guido van Rossum <guido@python.org> date: Tue Oct 26 17:58:25 1993 +0000 summary: * compile.[ch]: support for lambda() so that's only two years after it was first released, and before it was 1.0. The code was user-contributed, but given the timing and the recollections at http://python-history.blogspot.com/2009/04/origins-of-pythons-functional-features.html http://python-history.blogspot.com/2009/04/origins-of-python... I can't agree that the historical record is compatible with "dragged kicking and screaming to lambda." (See also http://legacy.python.org/search/hypermail/python-1994q2/0705.html http://legacy.python.org/search/hypermail/python-1994q2/0705... for his views on the topic from 1994.) Van Rossum doesn't think lambda is important, and would rather not have it in Lisp. He wanted to remove it for Python 3, but there was large opposition to that. See his viewpoint from 2005 at http://www.artima.com/weblogs/viewpost.jsp?thread=98196 http://www.artima.com/weblogs/viewpost.jsp?thread=98196 . After a large debate about alternatives (see https://wiki.python.org/moin/AlternateLambdaSyntax https://wiki.python.org/moin/AlternateLambdaSyntax ) he agreed to keep lambda in 2006 at https://mail.python.org/pipermail/python-dev/2006-February/060415.html https://mail.python.org/pipermail/python-dev/2006-February/0... .
- Psyonic 11y agoWhat a shame it would be if he'd removed it. Pyspark now makes great use of lambdas, and I'd strongly argue that having to name every function argument would be strictly worse.
- dalke 11y agoTk developers have long agreed with you, because it really is easier to say Button(frame, text="abc", command=lambda: self.highlight("abc")) than to make a function for each command. The loose consensus in Python is that lambdas are best when they fit on a line, which is what the examples at http://www.mccarroll.net/blog/pyspark2/index.html http://www.mccarroll.net/blog/pyspark2/index.html do. Otherwise, make a named function. I think arguments like this are one of the main reasons why van Rossum has kept lambda in the language.