Symbols, Protocols, Frames, and Versioning
khs4473 at gmail.com
Wed Oct 3 12:40:55 PDT 2012
> So should there be a way in the language to create singleton symbols? If
> so, how?
: ) 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss