Symbols, Protocols, Frames, and Versioning

Sam Tobin-Hochstadt samth at
Fri Oct 5 08:25:35 PDT 2012

On Fri, Oct 5, 2012 at 11:23 AM, Mark S. Miller <erights at> wrote:
> On Fri, Oct 5, 2012 at 7:11 AM, Sam Tobin-Hochstadt <samth at>
> wrote:
>> Note also that `Symbol.for` has some really weird behavior. For
>> example, what does this evaluate to?
>>     Symbol.for("x") instanceof Symbol
>> That depends if someone has previously evaluated `Symbol.for("x")` in
>> a different frame.
> If this is true, then it is obviously a fatal problem with the whole
> proposal, independent of all other issues. Do symbols have a [[Prototype]]
> whose value is a Symbol.prototype?

There are actually a couple other options here:

 - Symbol values have no prototype (thus the expression above is always false)
 - The `Symbol` prototype is shared across all frames (but what is its

sam th
samth at

More information about the es-discuss mailing list