3 ms·
I believe Guido was against it as he is mostly opposed to the functional style, as a matter of fact he was opposed to lambas but begrudgingly added then after m
by trashburger 6y ago
I believe Guido was against it as he is mostly opposed to the functional style, as a matter of fact he was opposed to lambas but begrudgingly added then after many requests.
- pansa2 6y agoGuido’s original plan for Python 3 included removing lambda (along with reduce, filter and map) from the language. https://www.artima.com/weblogs/viewpost.jsp?thread=98196 https://www.artima.com/weblogs/viewpost.jsp?thread=98196
- Too 6y ago"Guido was against multi line lambdas" is always brought up in these discussions and then someone digs up an old email from 10 years ago where it happens to be mentioned in passing by. Given the recent success of anonymous functions and it's widespread use and impact in other languages, like Javascript, C#, Java, C++11, maybe it's time to re-evaluate that opinion. I mean, what would javascript be today without promises and multi-line anonymous functions?
- pansa2 6y agoNow that Guido is no longer BDFL nor on the Steering Committee, it doesn’t really matter what he thinks. But, it’s still unlikely that we’ll see full anonymous functions in Python. They just don’t work with its significant-indentation syntax.
- divbzero 6y agoI dug up that “old email from 10 years ago” which I hadn’t seen before. Guido laid out the challenges of multiline lambdas on a mailing list [1] and then followed up with a blog post [2] [3]. His chain of thought is worth reading in full, but the crux is lack of “Pythonicity” and his gut feel that named functions avoid the complexity and possible ambiguity of multiline lambdas: def callback(x, y): print x print y a = foo(callback) [1]: https://mail.python.org/pipermail/python-dev/2006-February/060621.html https://mail.python.org/pipermail/python-dev/2006-February/0... "[Python-Dev] Let's just keep lambda" [2]: https://www.artima.com/weblogs/viewpost.jsp?thread=147358 https://www.artima.com/weblogs/viewpost.jsp?thread=147358 "Language Design Is Not Just Solving Puzzles" [3]: https://news.ycombinator.com/item?id=20672739 https://news.ycombinator.com/item?id=20672739 "Language Design Is Not Just Solving Puzzles (2006) | Hacker News"
- heavyset_go 6y agoThanks for putting this together.