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

Well, you're implicitely asking for it. In Rust you have to explicitely specify your intent, i.e. not by omitting something, but rather by specifying that you want to ignore it.



True. I agree it could be better if omitting the check looked like the exception and not the other way around. You could also argue that encoding non-presence on the type is more powerful/elegant/whatever than multiple return values. But what I wanted to point out is that the problem is not that "Go indicate[s] this error case with a return of zero". The language has an easy way to check this and he ignored it (he eventually used comma-ok in his code, although he makes the check first and the assignment later in different operations for no apparent reason).




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: