3 ms·
I don't think you meant to imply this, but for anyone else - please note that the reverse can also be said - closures from an FP setting are objects from an OO
by simiones 8y ago
I don't think you meant to imply this, but for anyone else - please note that the reverse can also be said - closures from an FP setting are objects from an OO setting, and it is natural to implement closures if you want them; see e.g. C++ "functors".
That is, objects and closures can both be implemented in terms of the other, if your language doesn't happen to offer both.
- chriswarbo 8y agoLots of discussion and links on this at http://wiki.c2.com/?ClosuresAndObjectsAreEquivalent http://wiki.c2.com/?ClosuresAndObjectsAreEquivalent