Re:All you need is call/cc (2013)
by Koshkin on Wednesday August 25, 2021 @02:35PM
(#28305220)
You are not incorrect, but in C++ a closure (lambda) is quite literally an object (of an anonymous class).
[ Parent
| on HN ]
It 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.
very 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.