3 ms·
My problem with people who argue about gotos is that the original implementation of goto is so far removed from this era of programming. It used to be you coul
by CoolGuySteve 12y ago
My problem with people who argue about gotos is that the original implementation of goto is so far removed from this era of programming.
It used to be you could jump to anywhere in many programs. That would be understandably annoying.
But I've never used a modern programming language that allowed you to jump out of the current function scope. In that case, there's only a small range of lines your goto can go to, hardly what the original essay was talking about.
Now if someone writes a C program with thousands of lines in main() and goto as the primary control construct, then yes, complain about it.
- agumonkey 12y agoThat's what I got reading Learn C the hard way, the author showed how small uses of function local GOTOs gave you very nice and clear failure mode. It even merged all exit points to one or two, making it easier to reason about.