News for hackers. Stuff that matters.
Re:Rust should not have provided `unwrap` by user249 on Friday July 15, 2022 @01:09PM (#32110374)
When I was learning Rust, unwrap felt like cheating
Re:Rust should not have provided `unwrap` by grumpyprole on Friday July 15, 2022 @01:11PM (#32110411)
It is! :) Perhaps the name could have made it more obvious: e.g. "get_or_fail"
Re:Rust should not have provided `unwrap` by scotty79 on Friday July 15, 2022 @01:17PM (#32110492)
It could be named .ordie() like php idiom from olden times.
Re:Rust should not have provided `unwrap` by yakubin on Friday July 15, 2022 @03:46PM (#32112021)
I associate it more with Perl. A quick search reveals Perl to be older than PHP by 7 years, so I'd guess it's a Perl idiom borrowed by PHP.