3 ms·
Hmm, except that his first example is weird. He tries to rewrite all of his logic, instead of just putting an extra case at the top: if (b & c) { x
by anthonyb 16y ago
Hmm, except that his first example is weird. He tries to rewrite all of his logic, instead of just putting an extra case at the top:
if (b & c) {
x = 3;
elif (a) {
...
which according to his methodology is an "overlap", and thus bad - but seems a lot clearer to me than his program's simplification:
if (a & (!b | !c)) {
x = 1;
} else if (!a & ((b & !c)|(!b & c))) {
x = 2;
} etc...
Ditto for the fibonacci stuff and his later examples. And they're pretty straightforward. For larger functions I can see it spiraling out of control.