typeof symbol (Was: Sept 19 TC39 Meeting Notes)

Herby Vojčík herby at mailbox.sk
Mon Oct 1 03:32:55 PDT 2012

Andreas Rossberg wrote:
> On 29 September 2012 20:14, Rick Waldron<waldron.rick at gmail.com>  wrote:
>> Offline discussion with Dave that immediately identified a deal-breaker: if
>> typeof symbol were "string", it would break ===.
>> === for strings is based on their contents
>> === for objects is based on their identity
> Well, that's clearly up to interpretation. Instead of having
> "identity", you can just as well view symbols as something with unique
> abstract "content". That is, I disagree that this alone is a

+1, I wasn't able to explain this, but I also had this on my mind.

> deal-breaker of any kind.
> But nevertheless, of course, using typeof symbol === "string" would be
> bad for other reasons, some of which have been brought up in this
> thread.
> /Andreas

More information about the es-discuss mailing list