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

That solves nothing. The point was that you pollute the scope with error variables, leading to dangerous logic errors that can be hard to spot. Your snippet is no better than:

  foo, err := getFoo()
  if err != nil {
    return nil, err
  }
"err" still ends up in the scope.


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

Search: