Configurability of @@toStringTag for Built-ins

Rick Waldron waldron.rick at
Tue Dec 16 10:49:45 PST 2014

Allowing configurability of the value of a built-in object's @@toStringTag
property has the (likely undesirable) side effect of making calls to unreliable.

Illustrated here:

Repeated here for the purpose of discussion: Map());
  "[object Map]"
  Object.defineProperty(Map.prototype, Symbol.toStringTag, { value: "Fish"
  // ... Map());
  "[object Fish]"

While this won't break existing code (see:,
there should be consistency across built-ins. I propose we adopt as a rule
that the @@toStringTag for all _built-ins_ is always defined as:

{ [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list