News for hackers. Stuff that matters.
Re:Go Enums Suck by LispSporks22 on Friday March 01, 2024 @04:28PM (#39567018)
> 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.

Re:Go Enums Suck by gregors on Friday March 01, 2024 @07:07PM (#39568420)
I still can't understand how anyone designing a language can defend self-rolled stack traces as a good thing.
Re:Go Enums Suck by coffeebeqn on Friday March 01, 2024 @09:03PM (#39569139)
You can in theory unwrap them but that seems to rarely be something people use in the real world
Re:Go Enums Suck by yhavr on Saturday March 02, 2024 @07:35AM (#39572145)
Please explain how errors are fundamentally different so they require drastically different way of returning.