Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is a class which implements a 'defer' mechanism, similar to Go and Javascript constructs, which do the same thing - delay execution of the given block until the current block scope is exited. Its pretty clever, actually, and quite useful.

I personally don't find it that cursed, but for many old C++ heads this may be an overwhelming smell - adding a class to implement what should be a language feature may tweak some folks' ideology a bit too far.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: