Re:If goto statements are bad why does linux src have more t...
by ninkendo on Tuesday December 16, 2014 @10:26PM
(#8760928)
C has loops and functions. But you're right that modern use of goto is typically used in error handling to replace specific use cases of exceptions in a primitive way (If error, goto end of function where cleanup is done before the return statement.)
[ Parent
| on HN ]
Re:If goto statements are bad why does linux src have more t...
by imanaccount247 on Wednesday December 17, 2014 @11:20AM
(#8762805)
>C has loops and functions
Which leaves...
> But you're right that modern use of goto is typically used in error handling to replace specific use cases of exceptions in a primitive way
Exactly. I pointed out the context of "goto considered harmful". Obviously the one that applies to C is the one that is the reason for all the gotos in C code.