2 ms·
I think that going from a language with real genuine closures to one with the half measure that Python has (lambdas) would actually be a backwards step. Plus I
by zmmmmm 15y ago
I think that going from a language with real genuine closures to one with the half measure that Python has (lambdas) would actually be a backwards step.
Plus I agree with the other (downvoted) commenter that whitespace would be a huge annoyance. A language for the web has to be something robust to copying and pasting to / from web pages.
- andybak 15y agoClosures and lambda (anonymous functions) are orthogonal features. Python has closures (and one last limitation related to scope and rebinding was fixed in Python 3) Furthermore although I agree Python's limited lambda's make it slightly uglier to do some constructs, it's merely syntactic sugar. First-order functions are the critical feature. Whether you are compelled to give them a name or not isn't critical.