[Bug 28244] Requiring @@toStringTag on instances may have performance implications

https://www.w3.org/Bugs/Public/show_bug.cgi?id=28244

Domenic Denicola <d@domenic.me> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |chris@dumez.cc,
                   |                            |travil@microsoft.com

--- Comment #13 from Domenic Denicola <d@domenic.me> ---
It would be really good to work out the story here.

I strongly believe that @@toStringTag on the prototype, as a simple data
property instead of a getter, is more correct:

- It matches the ES built-ins
- It fits better with JavaScript's prototypal inheritance model (now that
toString behavior is something that prototypally inherits)
- It's simpler
- It's possibly more performant (although a sufficiently smart optimizer could
probably equalize them)
- It's very likely to be web-compatible given that it's been shipping in Chrome
for several releases

Per comment #8, Boris doesn't quite agree, or at least doesn't want to be
second-mover here.

Perhaps we could get other engines to comment? In particular, have any of them
started moving their DOM to use ES6 @@toStringTag instead of ES5 [[Class]],
such that they have an opinion on this matter?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Friday, 2 September 2016 16:53:51 UTC