Symbols, Protocols, Frames, and Versioning

Axel Rauschmayer axel at rauschma.de
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 gmail.com> 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 mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss

-- 
Dr. Axel Rauschmayer
axel at rauschma.de

home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121003/4db7e8da/attachment-0001.html>


More information about the es-discuss mailing list