News for hackers. Stuff that matters.
Re:Rust 1.0: Status report and final timeline by Animats on Saturday February 14, 2015 @02:32AM (#9049030)
Closeout is always difficult. Destructors don't handle errors well. Neither does Go's "defer".

Python's "with" clause seems to do the best job of making sure closeout is handled properly. Take a careful look at the extra arguments to a __exit__ function in Python,s "with". It's one of the few closeout methods where things such as an exception during closeout (an I/O error during file close, for example) is handled in a way that doesn't interfere with other closeouts.

There are no comments on this comment yet.