Re:Things about programming I learned with Go
by _ph_ on Friday August 25, 2017 @10:52AM
(#15098849)
Yes, I certainly was not advocating ignoring any error. Which is, why exceptions are of dubious use. If you only check exceptions around a larger block of function calls, or every several levels of the call stack, then you might miss the exact source of the exception, unless the exception type is unambiguous. That is, why I find the Go version tedious for sure, but still better than to wrap single function calls into try... catch.
Re:Things about programming I learned with Go
by vram22 on Thursday August 24, 2017 @07:09AM
(#15089109)
>ceremony three times. In Java it happens by default,
What happens by default? Not clear. (I know Java, but not up to date with recent versions.)
>Ignoring an error is almost always a serious mistake
Agreed.
Re:Things about programming I learned with Go
by concede_pluto on Thursday August 24, 2017 @01:37PM
(#15092206)
In Java, an exception outside a catch block automatically stops the method and raises the exception to the caller, and then their caller, and so on. In Go you have to write this after every function call (except the tiny minority that can only panic).
Ignoring an error is almost always a serious mistake, so the fact that Go makes it easy and not blatant is not a good thing.