Proposal: Automatic Resource Management (original) (raw)
Vilya Harvey vilya.harvey at gmail.com
Mon Mar 9 10:55:39 PDT 2009
- Previous message: Proposal: Automatic Resource Management
- Next message: Proposal: Automatic Resource Management
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
2009/3/9 Tim Peierls <tim at peierls.net>
And yes, this will frustrate designers of new resource-ish types who want ARM support but for whom "close" is not at all the appropriate verb. But designers of new types are at least free to design abstractions that aren't as delicate in their clean-up requirements as the current crop of Closeables.
Just as a data point, the equivalent to this in Python - the with block - uses the method names enter and exit (you can ignore the double underscore, that's just a Python convention).
I joined this mailing list too late to see the proposal when it was posted; does it include calling any kind of setup method on entering the block? If not, this may be worth considering as well?
BTW, is there anywhere online where I can read the proposal?
Vil.
- Previous message: Proposal: Automatic Resource Management
- Next message: Proposal: Automatic Resource Management
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]