-
Notifications
You must be signed in to change notification settings - Fork 102
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
initializedIntlObject mechanics still necessary? #115
Comments
shouldn't be needed, as long as all the constructor starts with a line like: If NewTarget is undefined, throw a TypeError exception. see, for example: https://tc39.github.io/ecma262/#sec-map-iterable (corrected should to shouldn't) |
Ok, I can take care of this as part of the clean up process before the next cut. |
fwiw JSC does not implement a concrete As a js dev, I would like to keep the v2+ mechanism of calling without |
@thetalecrafter I was suggesting a purely editorial change, nothing to change observable semantics. It seems like [[initializedIntlObject]] doesn't really do anything anymore in v2+ as the path where it is false is dead code. That doesn't have anything to do with new-less constructors, which are implemented in the first line of constructors as "If NewTarget is undefined, let newTarget be the active function object, else let newTarget be NewTarget." |
@littledan sounds good. @allenwb's comment gave me the impression there would be a necessary change in behavior. |
Oh, somehow I missed that. @allenwb , two questions:
|
|
That's a good idea to give more context. I'll add a note. I can't speak to the case for not implementing it, as I work on an implementation which does implement Annex B. Maybe @erights can give more context here, which we could work into the note. |
@littledan sure: But is this entire kludge still necessary? When the issue was first raised, I thought it was described as a transitional issue that would soon be behind us. If we did not do any of this kludge, what would still break? |
@erights I meant more about the motivation for why it should be normative-optional rather than simply normative; I couldn't find that detail in the links you provided. To research whether this compat fix is still necessary, maybe someone could put statistics collections in browsers. The simpler path would be to just try shipping pure v2 semantics again, but I'm hesitant to do that since we know that broke websites the last time, and we've worked out a fix which already made it to multiple implementations and the draft spec. |
Well, the two are tied together. The reason it is normative-optional is so that implementations are free to stop shipping the kludge as soon as they judge that they no longer need to. |
@littledan send the PR about |
This internal slot has not done anything since ECMA 402 v1. This patch simply removes it. Closes tc39#115
I notice this issue is closed. What is the answer to the question? Is any of this kludge still needed? Do we know? |
I would love to kill the kludge if we don't need it anymore. |
I'm not sure which kludge you're talking about. This bug was all about a purely editorial change, and it was possible to remove that kludge, see the above patch. I don't have any data about whether the kludge in initializing non-Intl objects as DateTimeFormat or NumberFormat is still needed; I'm not so confident, personally. |
In ECMA 402 v1, the internal slot
[[initializedIntlObject]]
provided the function of ensuring that a single object didn't have the constructor called on it multiple times for different Intl constructors. However, with ECMA 402 v2 and greater, you can't initialize an existing object as in intl object. Are the mechanics still needed? cc @rwaldronThe text was updated successfully, but these errors were encountered: