Tom Van Cutsem wrote:
2012/10/4 Brendan Eich <bren...@mozilla.org <mailto:bren...@mozilla.org>>
I don't think we've had a proposal yet for singleton modules per
set of connected realms. Possibly I missed it (something is
tickling a memory but I can't find a ref). It could be good!
This might have been the post that tickled your memory:
<https://mail.mozilla.org/pipermail/es-discuss/2012-September/024946.html>
Yes, thanks.
But this was about singleton module instances per loader context. Not
sure if "loader context" coincides with "set of connected realms" though.
AFAIK there's no facility for loading or finding already loaded a
singleton module per connected set of realms.
If there were, it could be good for public symbol usage cross-realm as
Kevin points out. It could also make a nasty channel among realms (IIRC
the navigator object in some browsers can act like that, or perhaps only
within a navigation history of one realm with multiple inner window
objects and one WindowProxy public global).
Dave Herman mentioned another idea: intern'ing strings as symbols. You'd
lose uniqueness but avoid colliding with any string. So
public @iterator = Symbol.intern('iterator');
Is this much better than just using 'iterator' or dunder-iterator?
/be
Cheers,
Tom
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss