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

I mean, I wish Go had sum types, but this really isn’t a problem in practice. Every Go programmer understands from day 0 that you don’t touch the value unless the error is nil or the documentation states otherwise. Sum types would be nice for other things though, and if it gets them eventually it would feel a little silly to continue using product types for error handling (but also it would be silly to have a mix of both :/).


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

Search: