3 ms·
Which is great until you have to troubleshoot an error code surfaced by a nasty web of code with no idea where it came from because the simplest way to handle e
by cwillu 9mo ago
Which is great until you have to troubleshoot an error code surfaced by a nasty web of code with no idea where it came from because the simplest way to handle err is to re-return it, optionally (and more or less uselessly) wrapping it in a new err. I'll take a panic with a stack trace over that any day.
- bccdee 9mo agoThe trouble with Go is that, because the language is so simple, the obvious way to do a thing always has a bunch of drawbacks. Taking care of gotchas at a language level means complicating the language, but refusing to do so means complicating code written in your language. There's a balance to be struck here, but Go is stingy, so you don't get things like error traces and automatic destructors and const semantics even when they would make Go a much simpler language to use.