3 ms·
> Why do you unwind the stack? Something terrible happened? Definitely not, Definitely do. In Go we just have to emulate it, badly, by manually writing code
by LispSporks22 3y ago
> Why do you unwind the stack? Something terrible happened? Definitely not,
Definitely do.
In Go we just have to emulate it, badly, by manually writing code to forward the error up the stack so you can finally top-level print “error bad thing happen” or maybe some unholy stringification of wrapped errors possibly collected along the way.
- gregors 3y agoI still can't understand how anyone designing a language can defend self-rolled stack traces as a good thing.
- coffeebeqn 3y agoYou can in theory unwrap them but that seems to rarely be something people use in the real world
- yhavr 3y agoPlease explain how errors are fundamentally different so they require drastically different way of returning.
- deleted 3y ago[deleted]