4 ms·
If you know of any coding rule that is universally true, I'd like to hear. Maybe... Don't use goto to jump to the middle of a different block of code? I don't
by marcosdumay 8y ago
If you know of any coding rule that is universally true, I'd like to hear.
Maybe... Don't use goto to jump to the middle of a different block of code? I don't know any exception to this one, but it's also prohibited on all modern languages, so I don't think it's a "coding rule" anymore.
- ghtrytttttnsa 8y agoOnly wimps consider goto harmful.
- SamReidHughes 8y agoOftentimes if you have some hairy code, the best option is to use a goto, make a commit or leave a note, and then clean it up later, in a separate commit. It's more bisectable and leaves a more readable diff. I'm pretty sure I've had occasion to jump into the middle of a loop as the point of entry. Duff's device is a case of this.