2 ms·
The drawback is that the finally block is far away from the set-up block, which makes it painful to maintain and allows them to get out of sync pretty easily. I
by mehrdadn 9y ago
The drawback is that the finally block is far away from the set-up block, which makes it painful to maintain and allows them to get out of sync pretty easily. It's a syntactic issue rather than a semantic issue.
(This is only referring to use cases other than resource release.)
- maxlybbert 9y agoThat is probably the most well-known problem, but it’s not the only one. Another issue is that people generally don’t test failures as much as they should. They’ll generally get “everything must be rolled back” but mess up “only some things should be rolled back.”