3 ms·
The advantage of "defer" is that it's explicit. It's right there, and it's crystal clear when it will run. The "implicitness" and hidden nature of destructors
by watt 5y ago
The advantage of "defer" is that it's explicit. It's right there, and it's crystal clear when it will run.
The "implicitness" and hidden nature of destructors is a disadvantage, it's the unpleasant way it can introduce behavior which might be surprising.