cpp

I’ve been porting a lot of grungy C++ code… another of those “what do you really want?” dreams, but at some point my thought process turned into code. Can’t say I’ve had that happen before.

I’m slightly annoyed and mostly amused that the style was terrible, though. Anonymized, the structure was:

if (cond1) {
    f();
} else {
    if (cond2) {
        g(); // ...
    } else {
        h(); // ...
        // ...
    }
}

Good thing I’ve never said that “I’d write better code in my sleep”.

I wonder if the structure of my thoughts with respect to the underlying issue is reflected in that code, though.

Well, correctness is unaffected by style. More thoughts for another time and place.

Written on November 12, 2018