@@toStringTag spoofing for null and undefined
Allen Wirfs-Brock
allen at wirfs-brock.com
Wed Jan 21 09:53:34 PST 2015
On Jan 21, 2015, at 9:34 AM, Brendan Eich wrote:
> Allen Wirfs-Brock wrote:
>> There is no such thing as a symbol valued property key that is not exposed via reflection.
>
> Sure -- the idea was to make the symbol spec-internal, even use an abstract operation rather than a symbol -- anything to provide a spec hook for WHATWG/W3C specs to build on, without overcommitting.
Then it's not a symbol at all. It might as well be an internal slot on every objected named, for example, "[[Class]]".
>
> Calling @@toStringTag a "solid win" is premature. We can extend in many ways to allow the platform to be explained better in self-hosted JS. That does not mean a configurable non-writable property, "~"-prefixing, the whitelist.
I agree, that the anti-spoofing is the most questionable part of the design and I would be fine with loosing it. But is it really questionable enough that we can't live with what is specified. What is the fatal flaw. What does it actually harm?
Allen
More information about the es-discuss
mailing list