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

I suspect the downside is that it'll promote blind propagation of errors.

In rust that's fine because the type system will document what error types can be returned.

In golang, it important that every error type that can be returned is manually documented. Otherwise, it's better to just panic, since nobody can handle unknown errors anyways..

Or am I missing something?



Not really. You can just check if “err != nil” and switch control flow on this.


I always worry about state and side effects after handling an error like that..




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

Search: