3 ms·
With all the respect for a language that succeeded and the evidence that its choices are at least good enough, I think that they got it backwards. expect("th
by pmontra 3y ago
With all the respect for a language that succeeded and the evidence that its choices are at least good enough, I think that they got it backwards.
expect("the file is open")
is a positive statement.
expect("should have opened file")
is a kind of negative and less easy to understand. They should have hinted the developers to use the correct style with a different method
should("have opened file")
That said, it did not hinder Rust, maybe it even contributed to its success so it's OK even if it feels strange to me. But unwrap is really an awkward word to pick.