Hacker News new | past | comments | ask | show | jobs | submit login

I also like errors as values, I just wish there was a syntactically simpler way to express "let the caller of this function deal with the error".



like Zigs `try xyz();` which does what you say


Or Rust's `?`. The problem is Go returns errors by conventional multiple-returns/tuples, not by language construct.


it could do something sane but smart, like returning the error for whatever argument is an error type, and nil the rest.




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

Search: