Hacker News new | ask | show | jobs
by moleperson 1356 days ago
Even if Python used the anonymous function syntax proposed, people would still call them "lambdas". If you want to have aa keyword for this, you might as well name it after what most people are going to type into Google when searching for it.
1 comments

Not necessarily. In Perl we called lambda "anonymous sub" for ages, and nobody mixed those up. We also use a handy keyword less syntax to generate, store and use such lambda's. Thus I'm on the "Worse is Better" side, python cannot write proper compilers and cannot decide on proper syntax.

lambda: sub($x) {$x+1} decl sub{shift+1}(args) call

or ruby-like: {shift+1}->list