4 ms·
The reasoning behind "closures", is that one can capture some context such as the example you describe. If we think of an object as simply a record of functions
by willtim 6y ago
The reasoning behind "closures", is that one can capture some context such as the example you describe. If we think of an object as simply a record of functions, then we can close over some shared context during the construction of such records, if we have a language with records and closures.