4 ms·
Curious what did more to reframe the lambda keyword into a generic term for simple functions, AWS lambda or python lambda
by erwinh 4y ago
Curious what did more to reframe the lambda keyword into a generic term for simple functions, AWS lambda or python lambda
- heavyset_go 4y agoI 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.
- richardxia 4y agoScheme 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_002e3_002e2 https://sarabander.github.io/sicp/html/1_002e3.xhtml#g_t1_00...
- Snarwin 4y agoAnd 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-expressions/page/n5/mode/2up https://archive.org/details/recursive-functions-symbolic-exp...
- erwinh 4y agoWow 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
- Jtsummers 4y agoProbably 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.
- stormbrew 4y agoAside 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.