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

More than just that, Result in general also prevents from accessing the value when there is an error and accessing an error when there is a value.


The absence of that safeguard in Go is a feature. It's used when the error isn't that critical and the program can merrily continue with the default value.

Of course, this is also scarily non-explicit.




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

Search: