Hacker News new | ask | show | jobs
by ninkendo 4209 days ago
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.)
1 comments

>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.