News for hackers. Stuff that matters.
Re:Stop Forwarding Errors, Start Designing Them by morshu9001 on Sunday January 04, 2026 @05:06PM (#46492794)
The error handling is by far my least favorite aspect of Go. It's tedious and dangerous. It should either be like Rust or like JS, there isn't a good third option.
Re:Stop Forwarding Errors, Start Designing Them by tcfhgj on Sunday January 04, 2026 @05:15PM (#46492880)
what about checked exceptions (Java)?
Re:Stop Forwarding Errors, Start Designing Them by morshu9001 on Sunday January 04, 2026 @06:05PM (#46493339)
Isn't JS the same? But seems like people tend to make a lot of exception types in Java with inheritance, which I think is overkill.

Typically I'll only have a couple of exception types that my own code throws, like user error vs system error. If I want more detail than that, it goes into the exception payload rather than defining many different types of exceptions.