Re:LLVM Programmer’s Manual
by cyphar on Friday July 22, 2016 @03:40AM
(#12142254)
Except gotos are legitimately useful for cleanup inside a function before you return an error (see: the Linux kernel). Exceptions have overhead, and you have no idea where it will end up because the exception will bubble up the current call-stack, while gotos are local to the current function (and while longjmp is a mess, it is useful if you use clone(2)).
[ Parent
| on HN ]
You should be using RAII for any resources that you need to automatically clean up, then any return statement will catch it. No need for exceptions.