3 ms·
"With" must appear in client code, much like "finalize" clauses in Java and in similar GC languages. That is the opposite of automation: everywhere you need cl
by ncmncm 5y ago
"With" must appear in client code, much like "finalize" clauses in Java and in similar GC languages.
That is the opposite of automation: everywhere you need cleanup, you have to repeat the incantation, and get it right, again, every time. The point of destructors is that they are wholly contained in the library. It takes no extra client code to run them, and they are exercised identically on every single use of the type, so are well tested. Identically the same code runs on a throw, so there is much less risk from usually poorly exercised failure cases.
- deleted 5y ago[deleted]