Mark S. Miller (2013-07-30T00:36:55.000Z)
domenic at domenicdenicola.com (2013-08-02T20:08:12.084Z)
Yes. There are two opposite use cases. Both are necessary. ### Use case for something like unique symbols / public symbols / guids / funny-looking strings: Given that base at r = v succeeds at mutating something, we account for the mutable state as belonging to base. This allows r to be transitively immutable, and so sharable between subsystems that should not be able to communicate. All the unique symbols mentioned in the ES6 spec itself are of this form. Clearly, everyone (even across realms) must mean the same thing by @iterator, and so @iterator should not be mutable. When doing the operation across a membrane, where let's say the original of all three objects are on the other side of the membrane, it should be the proxy for the base object which traps the operation. Ideally, r should not be proxies, but should pass through the membrane in both directions untranslated. By trapping at the base, a base proxy which did not know r is able to obtain r in its trap handler. ### Use case for something like private symbols / weak maps / fields: Given that base at r = v succeeds at mutating something, we account for the mutable state as belonging to r. This allows base to be transitively immutable, and so sharable between subsystems that should not be able to communicate. (Note that, although we account for the mutable state as belonging to r in the semantics, the implementation should *always* store the actual mutable state in the storage record implementing the base object, just as it would do for an internal property.) When doing the operation across a membrane, where let's say the original of all three objects are on the other side of the membrane, it should be the proxy for the r object which traps the operation. By trapping at r, an r proxy which did not know the base is able to obtain the base in its trap handler.