On Jul 17, 2013, at 9:20 AM, Mark S. Miller wrote:
> I am uncomfortable expanding the typeof namespace. Where do these new names
> come from, and how do we avoid collision?
>
The typeof namespace has always been extensible and has historically been
extended by some implementations. But the only possible source of collusions
are such implementations not the whole web. Note that providing a typeof value
is one thing that we have not exposed via the MOP and in particular a Proxies.
There is current no explicit extensibility mechanism for them.
However, I'm not sure we would want to add a new typeof result for every
possible "value object" type. That probably would require an extension
mechanism.
Note that instanceof can be made into a reliable test for value objects.
I will defined Symbols.@@hasInstance such that
obj instanceof Symbol
is a reliable, cross-Realm test of obj's symbolness.
Allen
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss