2 ms·
RAII is great for transactions. In a proper robust design, commits should always be explicit and destructors only rollback uncommitted transactions. If your rol
by gpderetta 6y ago
RAII is great for transactions. In a proper robust design, commits should always be explicit and destructors only rollback uncommitted transactions. If your rollback can fail, well, then you have bigger issues.
There is now enough introspection in the language to actually implement implicit commit in a non exceptional path, but I think it would be a mistake.