Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As a TS dev, I found that this type of checking will blow up a codebase to the point where it becomes significantly harder to read. Worse, I've seen a good developer spend way too much thought and code on correctly reporting cases that realistically won't even ever happen. Since TS has stack traces, I find it much more practical to handle based on broader categories: Errors for users need some system for displaying messages, icons etc.. Errors for admins need similar handling, but it makes little sense to spend this much effort on pretty error handling when the error is for a developer.


> Since TS has stack traces

That's the key here - I would not need anything like this in Python either, because it has stack traces.

But Go designers decided to really drop the ball here - there are no stack traces on "err" values, so one has to implement them by hand as article demonstrates.

Which is a pity. Go has a lot of great things going for it, but the error handling just makes everything unnecessary verbose.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: