Hacker News new | past | comments | ask | show | jobs | submit login

I 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/0... "[Python-Dev] Let's just keep lambda"

[2]: https://www.artima.com/weblogs/viewpost.jsp?thread=147358 "Language Design Is Not Just Solving Puzzles"

[3]: https://news.ycombinator.com/item?id=20672739 "Language Design Is Not Just Solving Puzzles (2006) | Hacker News"




Thanks for putting this together.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: