-
Notifications
You must be signed in to change notification settings - Fork 179
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
Clarify, document, and enforce string types in data structs #571
Comments
Cow<str>
or SmallStr
should be used in a data struct
Another question I don't know the answer to, is what happens when TinyStr is too long in data providers? |
If the ASCII strings are fixed length, choose between TinyStr4, TinyStr8, and TinyStr16. If they are variable length, then you get into an interesting discussion of whether to use TinyStrAuto or fall back on Cow or SmallString. |
Blocked on #667 |
The enforcement should be handled by the new Action items remaining on this issue:
|
@gregtatum said in https://github.com/unicode-org/icu4x/pull/541/files#r597812794:
We should consider having a standard way to recommend whether a field in a data struct is best as a
TinyStr
,SmallStr
, orCow<str>
, in accordance with the style guide.We should also at least document why we reached a decision on which string type to use. @gregtatum also said:
The text was updated successfully, but these errors were encountered: