4 ms·
There's a subtle but important difference. They're not necessarily tied to each other anyway. For example in Python you frequently have lots of named functions
by PeCaN 11y ago
There's a subtle but important difference. They're not necessarily tied to each other anyway. For example in Python you frequently have lots of named functions that capture some variables in an outer scope, and are closures but not lambdas.
- recursive 11y agoYes. You can do the same thing in javascript. But it's pointless to say that "the source code that, when evaluated, creates a named function, is itself not a function" is just pointless lawyerism.
- adwf 11y agoPointless until you start dealing with macros. It can be important in some cases to know whether the closure "code" has been evaluated at that point or not.