-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove the Ord impl for LanguageIdentifier / Locale #1215
Comments
I don't really have strong opinions, I kinda find that "und" being sorted specially is fine: it is special so it isn't surprising that it is sorted differently. If the status quo were that the derive handled |
Semantically |
I don't have a strong opinion, but I think it would be less surprising if |
I think we should treat "und" as a language code to be sorted alphabetically, like "mul" and other special codes. Ultimately this will just be less surprising for people.
Marking this as a good first issue! |
Yeah it's fine! |
OK, so the However, it still may not be perfect for
|
Discuss: Is it better to ship an |
Discussion:
Conclusion: Remove both |
Currently, the auto-derived Ord impl of LanguageIdentifier sorts them by struct values, which is close to but not exactly the same as lexical order of the strings. For example, "und" is sorted at the beginning, rather than in the 'u's.
What behavior do we want? Should we keep the default Ord, or should we write a custom Ord that results in the same ordering as sorting by the string values?
Needs input from:
The text was updated successfully, but these errors were encountered: