3 ms·
"there should be no lambda in Python" According to this blog post there isn't, and yet there is? I'm more confused by the way this was written than Python's im
by sublinear 4y ago
"there should be no lambda in Python"
According to this blog post there isn't, and yet there is? I'm more confused by the way this was written than Python's implementation of the "lambda" keyword.
- akprasad 4y agoMy paraphrase: There should be no lambda keyword in Python because the lambda keyword implies idiomatic support for lambda calculus, which Python does not have. (I infer that the author supports renaming the keyword to something like inline instead.)
- kllrnohj 4y agoThe author says as much in the post. There's some discussion of inline towards the end.
- thrown_22 4y agoThe original lambda calculus also didn't have implicit currying for multi-variable functions. If you wanted to curry a function you had to write out λx.λy.λz. x (y z) If you wrote the much more user friendly λ x y z . x (y z) And tried currying it then it would fail. The author is complaining that Python doesn't use a dialect of lambda functions used in Haskell. Which is true. Python isn't Haskell and shouldn't be.