Re:Modern C [pdf]
by hellofunk on Monday November 28, 2016 @10:19AM
(#13055924)
The only valid use of goto I've seen is for breaking out of nested loops; a goto statement is much easier than unwinding a bunch of breaks based on arbitrary logic or flags to notify each parent loop that a break is needed.
[ Parent
| on HN ]
Re:Modern C [pdf]
by cellularmitosis on Monday November 28, 2016 @10:25AM
(#13055952)
It's also handy for error handling / cleanup: http://eli.thegreenplace.net/2009/04/27/using-goto-for-error...