Symbols, Protocols, Frames, and Versioning

Axel Rauschmayer axel at
Wed Oct 3 12:45:04 PDT 2012

Not necessarily: you could have an environment that is global to all frames. But that seems like a security risk.

On Oct 3, 2012, at 21:40 , Kevin Smith <khs4473 at> wrote:

> So should there be a way in the language to create singleton symbols? If so, how?
>     new Symbol("21fef4ae-1439-4b6a-b412-3585906b35f1");
> : ) Joking, of course.
> Seriously though, in order to specify a singleton symbol in user code, you'd have to give the system enough information to be able to identify other occurrences of such a symbol in the multi-global environment.  So in effect, you'd have to supply the system with a globally unique identifier.  Ergo, we've travelled right back around to maintaining a global namespace.  "org.ecmascript.system.iterator", anyone?  ; )
> You could say that the URL of the script where the symbol is defined forms the basis of such a unique identifier, but we'd still have to worry about multiple copies of the same script (or perhaps different versions) located at different URLs.
> Kevin
> _______________________________________________
> es-discuss mailing list
> es-discuss at

Dr. Axel Rauschmayer
axel at


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list