2 ms·
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 opti
by morshu9001 10mo ago
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.
- tcfhgj 10mo agowhat about checked exceptions (Java)?
- morshu9001 10mo agoIsn'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.