Hacker News new | ask | show | jobs
by senderista 206 days ago
> And while we're at it, GOTO is never a good idea, don't use it even if your language provides it.

Good luck with that if you're a C programmer.

2 comments

These are not the same thing. The GOTO people complained about and what the famous article "GOTO considered harmful" is about, is called longjmp in C. Nearly all C programmers will agree with you that you shouldn't use longjmp. The goto of C has less freedom for control flow than try-catch constructs in other languages.
Well sure, but don't use it to implement if/while/for.