> - Symbols, even when not used for encapsulated abstractions, are > great for avoiding the possibility of collision in the global string > namespace > - So, we (tc39) decided to use them for to replace the property name > currently called "iterator" in Spidermonkey. > - Currently, "iterator" works across same-origin frames, but a naive > use of Symbol for this wouldn't work > - Therefore, we have a few options: > 1 Give up on Symbols for "iterator" > 2 Make the Symbol replacement for "iterator" magically work across > all same-origin frames > 3 Make iteration not work across frames > 4 Break the web and fix cross-frames to work more sensibly > - Since the latter two of those are not actual options, (2) seemed > like the best choice. > - But then we, the language, are doing something that programmers > can't do, so we searched for something else > - This led to `Symbol.for`, which is not actually allowing > programmers to do (2), but resembles it somewhat >
Good breakdown, but note that the problem isn't strictly confined to cross-frame situations. See last paragraph of the original post about protocol versioning. Kevin
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss