-
Notifications
You must be signed in to change notification settings - Fork 182
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
Evaluate consistency and naming of char vs u32 methods in icu_collections and icu_properties #2413
Comments
I think the contains overloads work well. |
I think Though I'm skeptical we should have these in the first place, I guess. it's easy enough to |
Concretely, the classes and functions in question are
I'm not sure what my preference is. I'm okay leaving things the way they are, and considering CodePointTrie a special case since it is a low-level collection type. If we start renaming things, what about:
|
Note: The data structures are designed to map from code points to values. In Rust, supporting all code points requires u32 because char forbids surrogate code points. Therefore, one could argue that the primary input should be a u32. Lookup via char would use a cast, or an "override".
|
Discussion:
Proposal:
|
The proposal wfm. |
Still needs docs work |
Given that we have decided to use |
The problem was with |
No conclusion yet. |
utf32 is a string encoding. u32 is one possible type for a code point. |
Conclusion:
LGTM: @sffc @robertbastian |
LGTM |
We inconsistently name methods in the various properties and collections classes that deal with char vs u32. Examples:
contains(char)
,contains_32(u32)
,get(char)
, andget_u32(u32)
, but sometimes it isget(u32)
. And theget_u32
name sounds like it is returning au32
, similar toget_ule
, when in fact it is an overload of theget
method.Feedback from @markusicu.
Thoughts?
The text was updated successfully, but these errors were encountered: