Symbols, Protocols, Frames, and Versioning

Mark S. Miller erights at google.com
Thu Oct 4 12:23:20 PDT 2012


Brendan wrote:

public @iterator = Symbol.intern('iterator');

Allen wrote:

public @iterator = Symbol('iterator');

[...]

public @iterator = RegistryOfWellKnownSymbols.lookup('iterator');


The big advantage of the last one is that RegistryOfWellKnownSymbols could
be virtualized, so that code operating within such an environment looks up
a different symbol under the name 'iterator'.




-- 
    Cheers,
    --MarkM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121004/e0378b31/attachment.html>


More information about the es-discuss mailing list