Re:Rule of Zero (C++)
by Evbn on Friday November 23, 2012 @11:32PM
(#4824545)
That's more about coroutines than first class functions, and it is RAII, using a wrapper methodd for the actor/dtor instead of defining a class.
[ Parent
| on HN ]
it is not raii as i understand the term. there is no destructor involved in closing the file, there is just a function that opens the file, passes your code the handle, then closes it when you're done.
Doesn't this amount to the same thing ?