Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
C Shim for `Defer` Statements: Can It Be Compiler Agnostic? (github.com/sueszli)
2 points by sueszli 4 months ago | hide | past | favorite | 1 comment


Saw this HN post yesterday: https://news.ycombinator.com/item?id=45422717

It sparked joy and some great discussions. I turned the idea into a tiny, compiler-agnostic header-only shim that provides defer-like semantics in C as a short-term workaround until the language (hopefully?) adds a defer statement - Yay! :)




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

Search: