4 ms·
You are not incorrect, but in C++ a closure (lambda) is quite literally an object (of an anonymous class).
by Koshkin 5y ago
You are not incorrect, but in C++ a closure (lambda) is quite literally an object (of an anonymous class).
- codemac 5y agoIt seems anyone that implements objects first, implements closures with them. Anyone that implements closures first, implements objects with them. Let over Lambda being the super fun book of implementing anything with closures.
- gpderetta 5y agovery pedantically anything that occupies memory and has an an address is an object in C and C++. If you mean in the OO way, I wouldn't call a lambda an object as it doesn't even do dynamic dispatch.