by stouset · 9y ago · 0 comments
It infuriates me when go proponents try and sweep bad language decisions under the rug with half-fixes.
Mind you, if third party code needs debugging, you're going to have to fork it in order to apply your fixes in a timely manner anyway. Perhaps their stance is not as crazy as it may originally seem.
Happened here recently - modules used in the core build aren't versioned which means when someone external updated a module with an incompatible change, the build broke.
Moral: Never build direct from CPAN / GOPAN / CCAN / WHATEVSPAN without pinned versions.
I don't want to insult anyone, but this seems like an utterly insane software engineering practice to me. It means you can't just update to the next version of that library any longer. You're taking it upon yourself to review and patch every single new version of that library. Manually.
Even vendoring, which was added to the tooling later, is built on the idea of keeping your own fork. It just simplifies the forking process for people who do not work like Google does, where each fork is shared company-wide.
Not only are people here suggesting that you fork your dependencies to add stack traces to errors, which is a problem no other modern language seems to have, but it's also going to be a security disaster when some common package is found to have a vulnerability and ten percent of projects ever bother to update it.
I feel like I've entered some sort of bizarro world where everyone has forgotten that programming doesn't have to suck and pretends that none of this is a problem.
When you rely on dependencies you have to expect that not all of them will carry the same quality of code which you create yourself.
exceptions are a curse.
Anything can panic in Go. Go gives absolutely no guarantee something cannot panic. Errors as values are just a convention. So exceptions are a curse but Go has an inferior exception system, panics, but they are still exceptions.
The solution is checked exceptions.