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 <[email protected]> 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
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss

-- 
Dr. Axel Rauschmayer
[email protected]

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

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to