icu4x
icu4x copied to clipboard
Rename private::Key and other::Key to Subtag or PrivateSubtag/OtherSubtag
Feedback from @markusicu, which I very much agree with, is to rename icu::locid::extensions::private::Key and ::other::Key to Subtag instead of Key. Markus says that the spec does not make any statements on the structure of the content of these regions, so it would be a misnomer to call them "keys".
We should at least rename them to Subtag instead of Key. I hope this part is not controversial.
A larger change @markusicu suggested goes back to the suggestion in #2512 to give each type a more specific name. Instead of extensions::other::Subtag, it should be extensions::other::OtherSubtag or just extensions::OtherSubtag.
I am inclined to follow the recommendation from #2512 to keep the nested type names but improve our style guide and documentation around that.
@zbraniecki SGTY?
I'm comfortable with the change to Subtag.
I don't think I agree with the OtherSubtag - I prefer other::Subtag - but it's an arbitrary DX preference either way, so won't block if the group prefers to rename. I'd prefer not to expose them directly on extensions::* - I think it works really clean that each type is inside extensions::*::*.
I agree with Zibi, we already have extensions::Other which is the wrapper, OtherSubtags shouldn't be on the same level as that's not how Unicode and Transform work.