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

> This is just for resource allocation.

It's the same thing, you can represent the pair (operation, inverse) as a "resource". Python calls it "context management" (and context managers), the means are slightly different, the result's the same.

I agree that OP talks about something of a wider scope though, the language features described in these sub-threads are specialized solutions to precise issues, they're not generalized reversal of arbitrary operations.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: