Hacker News new | ask | show | jobs
by jejones3141 1215 days ago
I agree that in C, the disciplined use of goto is the way to go, but the "ok so far" version could be better written:

    if (oksofar) {
        oksofar = something_done = do_something(bar);
    }
    if (oksofar) {
        oksofar = stuff_inited = init_stuff(bar);
    }
and so forth.
1 comments

Or even oksofar = oksofar && do_something() to do away with the cumbersome ifs.