4 ms·
It's not that constructors and destructors can't be used. What he said IIRC is that you can't manage errors in them without either using exceptions or using tr
by lucozade 11y ago
It's not that constructors and destructors can't be used.
What he said IIRC is that you can't manage errors in them without either using exceptions or using trivial constructors/destructors plus a state machine for the remainder of the lifecycle (initialisation etc). As he's mostly into writing libraries not applications, both approaches were, in his opinion, more hassle than they were worth.