4 ms·
Personally I'm a fan of braces everywhere (though I prefer Allman style), but the one area where I've given up is precondition checks at the start of a function
by Merad 11y ago
Personally I'm a fan of braces everywhere (though I prefer Allman style), but the one area where I've given up is precondition checks at the start of a function.
Any style with braces looks like a cluttered mess compared to
if (foo)
throw ...
if (bar)
throw ...
if (baz)
throw ...
But I strictly limit that to the beginning of a function, and only `if (x) [throw|return] y;`