4 ms·
> Resource Acquisition Is Initialization is fine It doesn't work well at all for transactions, where both A and B must succeed or neither. https://dlang.org/a
by WalterBright 7y ago
> Resource Acquisition Is Initialization is fine
It doesn't work well at all for transactions, where both A and B must succeed or neither.
https://dlang.org/articles/exception-safe.html https://dlang.org/articles/exception-safe.html
- patrec 7y agoThanks, that's a nice discussion! Do you know if a similar, more granular approach (scope(exit)=~finally, scope(failure)=~catch, scope(success)=else) over go-style defer=~finally is implemented elsewhere than D?