-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
[FEEDBACK] u:locale
may be problematic for ICU4X and interoperability
#976
Comments
@u:locale
may be problematic for ICU4X and interoperabilityu:locale
may be problematic for ICU4X and interoperability
We currently say this about the message-format-wg/spec/u-namespace.md Lines 15 to 16 in a5eb9a3
Given that e.g. a conformant ICU4X implementation is therefore not required to implement them, are you ok with the spec still recommending them? |
Okay so this is another normative-optional thing. #977 |
In addition to the text @eemeli quotes, there is also this in the
@sffc noted:
Before you proceed to not implement this, note that standards are not always written for the convenience of the implementers. There are many cases in which a user wishes to override the locale of a given placeholder or expression, which is what |
Hm? This statement doesn't make sense. I am pushing back on the feature because I worry it may reduce performance, since we cannot take for granted that the locale is a constant.
Yes, we would likely keep single-locale as the faster path. But since multi-locale can occur, there are certain assumptions we cannot make, which impacts performance for everyone.
Yes. Of course. Implementers are one of several constituencies. I am very much familiar with these tradeoffs in my role as TC39-TG2 convener. My concern is about implementation difficulty and also the performance impact.
If that's true, then that's the most important thing and we'll figure out how to implement it and eat the cost. Do you have evidence of this, though? I don't think MF1 or most of the other syntaxes I'm familiar with support this feature. Can you point me to the discussion where it was proposed and added? |
Given this:
I do not believe that the SHOULD language alleviates my concern. I would prefer for this type of feature to be MAY. |
To summarize, my position currently is:
Determining whether a feature has "questionable or niche motivation" is a bit subjective, but some rules of thumb should be:
|
The option was extensively discussed in the WG through the Expression Attributes design doc, which hopefully provides some of the rationalization that you're looking for. Note that its Metadata section opens up, and includes links to the six PRs that helped shape the proposal. |
Thank you. I reviewed that design doc as well as the six linked PRs. Very good record-keeping. I did not, however, find justification for why this specific expression attribute should be included. I see a lot of discussion about how expression attributes are an important feature to include in the syntax, which is fine, but it seems like the three proposed attributes "id", "locale", and "dir" were all adopted without a lot of discussion on their individual merits, at least not that I can see from that source. The design doc says "A common example of [a message author wanting to set an attribute] is the locale", with the following example:
which seems like a fairly synthetic example. Can you share data on how widely If a feature is optional, like this one apparently is, implementations like ICU4X really need to know what tradeoffs are involved in implementing it or not. |
An early decision we made in the ICU4X design was that we would load data for formatters ahead of time into the built-in registry.
The
u:locale
option makes this more challenging and less efficient. Instead of loading number formatting data one time (for the message locale), we now have to load it an arbitrary number of times for an arbitrary set of locales.The text was updated successfully, but these errors were encountered: