Herby Vojčík wrote:
So, symbols look to me more like primitives/atoms (that means, not an object nor function) and so they should have their own typeof...

That's progress, if you agree typeof aSymbol should not return "string" ;-).

However, what you say about "I hold no subvalues, my identity is my value" can fit an empty frozen object too.

Anyway if you feel strongly typeof should return "symbol" not "object" we have to face the dragons around the edge of the known typeof map. Fortunately IE shipped some in the known world. I could buy "symbol" but I'm also inclined toward "int64", "uint64", and other value-object typeof results in the future.

The hard thing is the non-zero risk of breaking some code by officially extending typeof, vs. the zero risk of using "object". The latter won't break any code that already might fail due to the full range of {null, pre-ES5 objects, frozen/sealed via ES5 API usage objects}.

/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to