The name `@@toStringTag` sounds like a function, like `toString` and `toFixed`,
but it's just a string property. The fact that `@@toPrimitive` is a function
further makes the point.
Has just `@@stringTag` been considered?
Nathan
It's toString tag, not to StringTag.
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
Domenic Denicola wrote:
It's toString tag, not to StringTag.
Ah, you know, I hadn't made that connection. That's interesting.
I still think I would prefer something else... maybe even just `@@tag`. But
that certainly makes more sense out of the naming.
Thanks!
Nathan
@@tagForToString? Er, no.
It's actually not the whole return value of any toString call, of
course. It is the %s in [object %s] returned by
Object.prototype.toString.call(x) for an object x. This suggests
@@objectToStringTag
or something along those lines. Does that help?
/be
Nathan Wall
4 matches
Mail list logo