Hacker News new | past | comments | ask | show | jobs | submit login

I feel that the way this is implemented in the D programming language is more natural (Subjective, of course): https://tour.dlang.org/tour/en/gems/scope-guards

Although this approach would probably not work like this in Go given Go's lack of exceptions.




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

Search: