Re:Rust Weird Expressions
by cyphar on Friday May 14, 2021 @01:17PM
(#27156853)
That's not the correct plural rule in English, you'd want
or something (though to be fair the original code snippet also handled "0" incorrectly -- should be "cases.len() != 1").
[ Parent
| on HN ]
And also to be fair you probably don't want to be hardcoding English pluralization rules.
Re:Rust Weird Expressions
by rabidferret on Saturday May 15, 2021 @08:01AM
(#27164445)
I used to maintain a library which actually tried to implement proper English pluralization rules. I can confirm you don't want to do that.