Hacker News new | ask | show | jobs
by rxaxm 3066 days ago
in college my buddy made a defer function in C that is a little simpler (but only works with clang)

https://github.com/asubiotto/cdefer/blob/master/defer.h

1 comments

It's not just that it only works with Clang, but that it only works with Blocks (Apple's extension to C which basically adds closures of indefinite extent, which is pretty cool).