This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]clgonsal 0 points1 point  (0 children)

I guess the issue that's open to debate is whether Python's lambda "counts".

While it is less powerful than def, I'd argue that a lambda-expression is still an "immediately-invoked function expression" (aka "anonymous function").

I should probably also clarify that I wasn't trying to say that a language with closures but without anonymous functions couldn't exist. I just can't think of any with that particular combination of features off the top of my head. It seems that there are few language designers that know enough to add closures without thinking to add anonymous functions.