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

Of course it is. Unwrap panics on error, while ? bubbles up the error instead. But ? wasn’t introduced to replace unwrap, unwrap was always frowned upon. It instead replaces match and return.


It was always frowned upon, but still ended up everywhere (including lots of documentation and example code) because it was less verbose than the match handling. The ? helped remove that last obstacle.




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

Search: