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

Defer is used to automatically release resources on function exit, I'm not sure how result types will help here. Can you give an example?


It's an alternative to try...finally or RAII.




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

Search: