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

About that:

res, _ := some_func(…)




Sure, you can do that just as much as you can do "try! some_func()" in other languages.

But it's obvious that you're doing something naughty when you do.


You’re right. But that’s my point. You can “ignore” the error and Go doesn’t force you to do anything that about it. I’ve seen this in production code. Also I’ve seen people just checking the null-ness of the return value, ignoring the error. And that brings me to my point, which is, it’s all about good programming practices, whether it’s Python or Go.

edit: combating the overzealous auto-correct




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: