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

> Sidenote: I feel like people struggle to internalise that Go errors are just values* and are therefore are wildly flexible, yet not special in any way.

I think it's more they haven't used Go interfaces much.

I think most programming languages these days have errors-are-values, e.g. Rust Result transports a normal value, Python & Javascript exceptions are just values even when they are carried over a wildly different control flow.

(The argument for sum types and exhaustiveness is valid, but most languages don't have those so focusing that critique on Go is misguided. They are nice in Rust.)





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

Search: