3 ms·
GCC has had closures in C in the form of nested functions for as long as I can remember(but only as downward funargs).
by gpderetta 7y ago
GCC has had closures in C in the form of nested functions for as long as I can remember(but only as downward funargs).
- saagarjha 7y agoAnd the implementation was always an outright catastrophe…
- int_19h 7y agoI'm not sure these qualify as closures. But if they do, then they've been around in that exact form (named local functions with language semantics preventing them from outliving their environment) since Algol-60.
- gpderetta 7y agoI guess you are right, a true closure need to be able to outlive the scope of the variables it is closing over. Anyway, I wasn't making any claim that C got them first, far from it.