News for hackers. Stuff that matters.
Re:Fun with Swift by qwertyuiop924 on Tuesday January 05, 2016 @05:59PM (#10846784)
What you seem to be calling a closure refers to a lambda in a lexically scoped language. Particularly when they refer to free variables.

Blocks are in fact lambdas, or at least closures. I was wrong in the above. In some early versions of smalltalk, blocks had some odd semantics that made them different, but this is no longer true. However, judging by the Objective-C example above, Objective-C blocks don't create true closures, as a true closure would have the semantics of the Swift code from the article.

There are no comments on this comment yet.