Andrea Giammarchi wrote:
unique string (uuid or otherwise) suffer same problem if generated in 2 different realm unaware of each other.

Mark's point about UUIDs generated by robust RBGs (Random Bit Generators) addresses the collision risk: it is astronomically small.

In any case, as mentioned before, this is very similar to instanceof or isPrototypeOf/getPrototypeOf and I don't see many concrete real cases problems except being able to serialize and deserialize @symbols in a unique way across realms (symbol name within a specific module scope mapped as unique or anything that could work I cannot think about now ^_^)

This serialize point is good, and gets to something I raised with Allen yesterday, which he originally stated: realms should be *more* isolated. We may want distribuited (cross-machine) realms. IE and other browsers may already do cross-process window.open, returning a DCOM proxy or some such. SpiderMonkey in Firefox uses membranes across all realm/global boundaries, even same-origin.

Given this, I think instanceof (or typeof with an extension that must be realm-specific because implemented by user-code, or else we have to reify the "world of realms" as discussed in the other thread) breaking cross-realm could be addressed by saying "proxy harder". IOW let's not complicate JS with realms, worlds, truly global string to symbol registries, etc. etc.

Let's get back to the simplicity of same-realm as the normal case, with few-and-legacy exceptions. Can we do it?

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

Reply via email to