3 ms·
Aren't loops and ifs goto statements with implicit labels?
by dllthomas 13y ago
Aren't loops and ifs goto statements with implicit labels?
- groovy2shoes 13y agoHeh, I suppose you're right :)
- mtdewcmu 13y agoIf you want to find all the implicit gotos, just disassemble the compiled code. Your program will be littered with jmp instructions and the conditional versions of jmp. There's no getting away from them.
- groovy2shoes 13y agoYup, I know. I just got a little carried away :) My main point was similar to something you'd said earlier: > What we now know for absolute certain is that it's possible to write any kind of code without gotos (including awful code). I meant to point out the inverse, that it's possible to write good code even with gotos -- but it takes the same amount of care and diligence as writing good code in general. I don't mean to advocate the use of gotos, rather the elimination of the paranoia surrounding them.