News for hackers. Stuff that matters.
Re:The Shapes of Code by jpz on Tuesday January 28, 2020 @03:11AM (#22167436)
I actually find that surprisingly readable, probably because of the indent size which clearly allows the eye to see the blocks - and the size of my very large monitor - but this code seems to indicate a religious dogma about avoiding early returns, which would otherwise straighten it up.
Re:The Shapes of Code by a_t48 on Tuesday January 28, 2020 @03:24AM (#22167508)
Refactoring it effectively needs some sort of scope guard, too, to run `pfd->Release();` and the like. It's just as much dogma to write C++ like C, avoiding RAII.