Re:Guido was right, there should be no lambda in Python (2018)
by erwinh on Tuesday September 27, 2022 @07:15PM
(#33002358)
Curious what did more to reframe the lambda keyword into a generic term for simple functions, AWS lambda or python lambda
[ Parent
| on HN ]
Re:Guido was right, there should be no lambda in Python (2018)
by heavyset_go on Tuesday September 27, 2022 @07:18PM
(#33002387)
I think the colloquial usage has roots in Python's use of it, I've been hearing about anonymous functions being called lambdas for a long time. The Lambda service's name seems to play on that prior colloquial usage.
Re:Guido was right, there should be no lambda in Python (2018)
by richardxia on Tuesday September 27, 2022 @07:25PM
(#33002435)
Scheme has the lambda special form, predating Python by decades, and its version also allows for multiple parameters in a non-curried way. SICP served as a classical textbook in computer science for multiple generations of students, so I think that a lot of people's first introduction to lambdas as anonymous functions came from Scheme:
https://sarabander.github.io/sicp/html/1_002e3.xhtml#g_t1_00...
Re:Guido was right, there should be no lambda in Python (2018)
by Snarwin on Tuesday September 27, 2022 @08:03PM
(#33002759)
And the use of the LAMBDA keyword goes all the way back to John McCarthy's original paper on Lisp from 1960:
https://archive.org/details/recursive-functions-symbolic-exp...
Re:Guido was right, there should be no lambda in Python (2018)
by erwinh on Wednesday September 28, 2022 @05:11AM
(#33005964)
Wow wasn't aware of this long history.
My hot take for which I'm sure I'll get some hate is all languages should just include js-style arrow functions
Re:Guido was right, there should be no lambda in Python (2018)
by Jtsummers on Wednesday September 28, 2022 @10:34AM
(#33008446)
Probably little hate, it's a long existing style. Haskell, Erlang, the entire ML line of languages, and probably many more have all used it since last century. It came from mathematical notation, and it is concise.
Re:Guido was right, there should be no lambda in Python (2018)
by stormbrew on Tuesday September 27, 2022 @07:46PM
(#33002635)
Aside from the scheme example in the sibling reply, ruby has had a lambda, as a special kind of proc, for a very very long time and it is similarly not a "real lambda."
Honestly it's likely that for most of the history of the term it's been more used for "incorrect" meanings than "correct" ones.