3 ms·
> closures are finally entering the mainstream (after what, 5 decades?) 8 decades, to be precise. They predate electronic computing - Church published his orig
by peterkelly 12y ago
> closures are finally entering the mainstream (after what, 5 decades?)
8 decades, to be precise. They predate electronic computing - Church published his original paper in 1932.
It still amazes me that it's only in the past few years that widely-used languages have begun adopting them.
- bunderbunder 12y agoElements of the idea were in Church's work, but I think it wasn't until the 1960s that anyone thought of closing a lambda by using the lexical environment to bind its free variables. And it wasn't until the 1970s that Sussman and Steele really drove the idea home with Scheme. Before then even LISP didn't have closures. It was based on Church's ideas, and it did need to deal with figuring out how to bind a lambda's variables in order to evaluate it. But it was a dynamically scoped language, so capturing free variables from an anonymous function's lexical scope (which is what a closure does) didn't really make sense for it. Instead it just used the execution context to bind variables.
- tel 12y agoI don't think everyone knew how to implement lambada properly, but the calculus was clear enough. Hell, the original calculus was both lexical and substructural!