News for hackers. Stuff that matters.
Re:More powerful Go execution traces by Xeoncross on Friday March 15, 2024 @09:51AM (#39715466)
Errors are different in every stdlib or 3rd party package I've ever used.

The ecosystem as a whole decided that errors should be useful, values, and properly bubbled up - and that your application should not be so hard to reason about that you need a stack trace to know where in the deep recesses of your code something went wrong.

I love stack traces in Java, but I don't miss them at all in Go.

Re:More powerful Go execution traces by the_gipsy on Friday March 15, 2024 @12:02PM (#39717267)
Sounds a bit apologetic. I don't think that the ecosystem decided. The language creators decided, and the ecosystem couldn't do much about it.
Re:More powerful Go execution traces by Xeoncross on Sunday March 17, 2024 @09:43AM (#39734437)
I say ecosystem to mean the majority of packages. That's the ecosystem.
Re:More powerful Go execution traces by Cthulhu_ on Monday March 18, 2024 @06:18AM (#39742127)
Go's development process is fairly open and democratic though; if enough people flag it up, and if a case can be made for stack traces, it can be added.

As it stands though, the consensus is that it doesn't add enough value, it's too expensive (cost/benefit), errors are normal program flow, and 3rd party libraries can add the functionality if one decides they need/want it in their application.

Re:More powerful Go execution traces by eweise on Friday March 15, 2024 @03:12PM (#39719584)
"your application should not be so hard to reason about that you need a stack trace to know where in the deep recesses of your code something went wrong."

Curious how Go is better than other languages in this regard.

Re:More powerful Go execution traces by Cthulhu_ on Monday March 18, 2024 @06:20AM (#39742132)
That quote isn't about Go specifically though, but about general application design. It seems to be a subtle snipe that languages with stacktraces like Java, C# are too complicated or have too many layers ("lasagna code"), making them more difficult to debug.