-
Notifications
You must be signed in to change notification settings - Fork 244
Add non-complex segmenter constructors #7268
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
Conversation
1809310 to
c93669e
Compare
Manishearth
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit worried about the large number of ctors we have on Segmenter.
@sffc , thoughts?
sffc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's already an issue for this: #3612
I don't like the name "empty". Maybe it's okay. Since the only thing this PR does is add the new constructors, I don't see value in merging it until we've agreed on the name for it.
|
Also, reviewing the Parley thread, I don't think they should be using these new constructors? One of the reasons they want to use |
The "empty" constructor is on the internal
They do want to put complex segmentation behind a feature flag or BYOD though, which will be much easier if they don't have to do this through a single API by conditionally changing data provider behaviour. |
sffc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good modulo the function name which we can discuss today.
f98d0a1 to
2f5653e
Compare
2f5653e to
f4187e9
Compare
ca2a04b to
b708034
Compare
Co-authored-by: Shane F. Carr <[email protected]>
Users already do this with custom data (i.e. linebender/parley#436), we should provide an easier way. Fixes unicode-org#3612
|
Would you mind listing the new APIs added by this PR? I think it is the |
|
Changed APIs:
|
|
And that's how a library ends up with inconsistent, untidy APIs. One of the basic rules for an i18n library should be that all locales are treated the same when I look at the public APIs. As a dev I should not know what kind of a locale something is. And how do I know if a locale "is_complex_script"? The proper solution is to hide all of this in the regular constructor, in the library: |
You don't seem to have all the context here. We have the proper solution, our main constructor is called |
Users already do this with custom data (i.e. linebender/parley#436), we should provide an easier way.
Fixes #3612