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

Yes, I can always use First and catch Exception, which is meh.

First returning Result<T> or something like FirstOrNull would be better, because FoN would work for ref types - classes and stuff the same way (afaik) as FoD does, but it'd make error handling for value types like ints more precise



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

Search: