On Wed, Jul 31, 2013 at 9:27 AM, Mark Miller <[email protected]> wrote: > To avoid accidental collision on the interned symbols, you must avoid > accidental collision on the strings used as keys in this registration table. > This demands exactly as much collision resistant of string choices as using > the strings directly. And therefore also demands strings which are just as > ugly.
Theoretically, yes. I think that in practice, having the symbol namespace be separate from the string namespace is sufficient to avoid the vast majority of conflict issues. Colliding between symbols is much more difficult to do, and it's pretty easy to inject just a little bit of entropy into the string via a prefix or something. This is especially nice if we make language-defined symbols "fake it", more or less by living in a third undetectable namespace, so we avoid even the possibility of a language-defined symbol colliding. We'd then have three property namespaces: 1. Strings, which are convenient and easy to use, but also used by everything, so collision potential is moderate. 2. Symbol strings, which are less convenient, but also less necessary, so they'll be less things to collide with (and you can give one slightly long prefixed name for the actual symbol string, and a much shorter name to the (global?) variable *holding* the symbol object). 3. UA-defined symbol strings, which are identical to normal symbol strings but live in a third namespace to avoid any possibility of confusion. ~TJ _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

