3 ms·
To use academic terminology, we would refer to "floating functions" as "first class functions" (since they are not second-class citizens in the language). I wo
by thinkmoore 11y ago
To use academic terminology, we would refer to "floating functions" as "first class functions" (since they are not second-class citizens in the language).
I would argue the true distinguishing feature of a "lambda function" in a PL is that it is first-class, nest-able, and lexically-scoped (that is, it captures bindings from its definition site).
A closure is simply a way of implementing lexical scope for functions.
A variable is a "free variable" not because it is "freed" from its lifetime, but because it is not bound by its enclosing lambda. (It would still be a free variable even if the function and the variable binding had the same lifetime.)
- rdsubhas 11y agoAh dang, how I missed "first class functions" :) Thanks for reminding...