# A closure tale

a: speaking of closures, they messed it up
d: who? why
not sure I follow
a: the name I mean, it’s misleading
d: you don’t like closures?
a: see closure wiki: > In programming languages, closures (also lexical closures or function closures) are a technique for implementing lexically scoped name binding in languages with first-class functions.

function startAt(x)
function incrementBy(y)
return x + y
return incrementBy


a: this is a closure from a functional programming perspective
while in Swift every anonymous function is called a closure
surely you can use one to make a closure, but

The term closure is often mistakenly used to mean anonymous function.

d: ok, got it
a: sweet
d: for a broad idea thing they came up with a name that describes something more specific
you know how it’s called?
this figure of speach?
a: ?
d: a synecdoche
Synecdoche, San Francisco

comments powered by Disqus