Hacker News new | ask | show | jobs
by jeswin 2011 days ago
I like Rust from what I've tried. But I'd have preferred something like this:

  let file = file.unwrapOrPanicWith("file was null");
option.expect(message) doesn't semantically make sense.
2 comments

There was some discussion about this when the method was named; you're not alone. In the end, it is what it is. You could define your own method like that if you really wanted to.
I read it as expect (prepare) for the worst!