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

Idk, I'd take

   if err != nil {
      return nil, err
   }
over any of this :)


And now you introduce null and err checks all over your code base.

Rust tries to do this ergonomically with the ?-operator, which is not that easy in complex cases but reduces your cognitive load tremendously when possible.




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

Search: