-
Notifications
You must be signed in to change notification settings - Fork 108
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
Can we change the Intl prototypes to be normal objects? #122
Comments
Yep, let's do it! |
Given that it currently throws in V8, I'd be really surprised if there is code in the wild that relies on JSC's current behavior. I think it would be good to have the prototypes be plain objects. I'm willing to make the change in JSC once the spec change is approved. |
I did a quick pass at what the implications of this change might include: Referencing It's possible there is an expectation to be able to do Calling |
We are considering removing the way that other Intl prototypes are instances in tc39/ecma402#122 , so it seems like we can and should make this change at least for new proposals. Closes tc39#29
This proposal was started in tc39/ecma402#122, and specified in tc39/ecma402#148
@ericf ping |
@caridy Yeah the ticket was closed in April. The change is in the current technology preview and should be in Safari 11. |
@caridy Is this no longer an issue in Intl.js? |
@rwaldron it is not longer an issue there:
|
I have confirmed that V8, SpiderMonkey, Intl.js and JSC (technology preview) are aligned with this. I have opened the issue for ChakraCore as instructed by @bterlson for the fix. It seems that we are all in agreement. |
Do we need to bring this to the meeting or are we all set here? We have tests ready to land. |
Sounds like it's ready for @caridy to land. The tests can be landed once the spec patch is landed. |
I merged the PR based on the consensus that @caridy mentioned above, so tests should be good to land. |
This proposal was started in tc39/ecma402#122, and specified in tc39/ecma402#148
From https://bugzilla.mozilla.org/show_bug.cgi?id=1332604:
Intl.prototype.{Collator, DateTimeFormat, NumberFormat} are currently spec'ed as being instances of Intl.{Collator, DateTimeFormat, NumberFormat} (cf. 10.3, 11.4, 12.4). We should consider changing them to normal objects similar to how Date.prototype was changed to a normal object in the ECMAScript specification for ES6.
This change should be web-compatible because V8 already treats the prototype objects as normal objects.
The text was updated successfully, but these errors were encountered: