4 Feb
2016
4 Feb
'16
midnight
Writing correct code is not considered a major problem by most programmers and organizations which depend on code. Code that works most of the time is considered good enough.
Well, good enough is perfect in most projects. However, I do like simple drop-in wrappers that prevent stupid mistakes to ever compile, or that abort on overflows. About the construction topic, I think that a good compromise could be to choose a safe default (always initialize to 0) but to allow one to be explicitly unsafe: safe<int> i; // i == 0 safe<int> j(boost::uninitialized); // undefined It happens that the developer knows that initialization will be done later, or has already been done (mapped memory for example). Cheers,