Re:LLVM Programmer’s Manual
by clappski on Friday July 22, 2016 @06:40AM
(#12142764)
I happen to disagree. Exceptions are a powerful abstraction over errors that allow you to highlight the exact context of an error of handled properly by avoiding catches that just throw and actually giving the exception body useful information about the error that can be logged.
I haven't used Go (I'm about to for a small project, though) so I can't comment on the "if err != nil" idiom, but it seems like a step back by encouraging code duplication where it's not needed. I'm a fan of the pattern matching in rust, but it's still rather orthogonal to exceptions as it allows you to deal with an error when you try to access state whereas exceptions are most useful when they appear mid operation.
I haven't used Go (I'm about to for a small project, though) so I can't comment on the "if err != nil" idiom, but it seems like a step back by encouraging code duplication where it's not needed. I'm a fan of the pattern matching in rust, but it's still rather orthogonal to exceptions as it allows you to deal with an error when you try to access state whereas exceptions are most useful when they appear mid operation.