3 ms·
C++ blocks are pretty straightforward - they are syntactic sugar for functor structs, memory management is still up to you. I find Apple's C blocks a much more
by gurkendoktor 15y ago
C++ blocks are pretty straightforward - they are syntactic sugar for functor structs, memory management is still up to you.
I find Apple's C blocks a much more interesting design with some tricky trade-offs. And to top it off, the LLVM compiler treats C++ objects referenced in C blocks correctly, and you can pass C blocks to the STL for all purposes I can think of.