Brendan Eich (2013-07-29T17:21:44.000Z)
Domenic Denicola wrote:
> Reading through [the meeting notes][1]:
>
>> YK: You don't need unique symbols when you can just expose private symbols.
>
>> BE: Why can't we just have (private) Symbols
>
>> BE: Can we unwind the split between private and unique?
>
> These struck a chord with me. Thus, in the spirit of
>
>> BE: We aren't going to resolve this now, need to take it to es-discuss
>
> I thought I'd start off the thread.
>
> I believe the proposal is to not have "public" symbols, i.e. you cannot find any symbols via `getOwnPropertyKeys` or other such operations when given an object. However, if someone hands you the symbol object itself, you can of course use that to access the property's value. This would be sufficient for all the ES spec built-ins and would also provide truly private state for those that don't export their symbols.
>
> The interaction with proxies is complicated, but if I recall had been mostly solved.

That's about right, although the details need to be agreed upon.

Symbols would be not reflected easily (not via getOwnPropertyKeys), and 
would relationship-proxy as sketched in

http://wiki.ecmascript.org/doku.php?id=strawman:relationships.

But note how that strawman accentuates the differences between unique 
and private symbols. But let's say we only have "private" symbols and 
their exposure is up to the reference holder: they can be exported from 
modules to become "public", published via the heap as named values, etc.

This seems to neatly separate concerns, but Arv pointed out that for 
some proxy cases it won't work. I forget what he said exactly, though. 
Cc'ing him.

/be

> Would love to get some discussion on this, as to me it seems like a much stronger alterative than abandoning symbols altogether in favor of GUIDs.
>
> [1]: https://github.com/rwldrn/tc39-notes/blob/master/es6/2013-07/july-25.md#51-symbol-primitive-value-or-object-one-more-time
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
domenic at domenicdenicola.com (2013-08-01T17:24:09.143Z)
That's about right, although the details need to be agreed upon.

Symbols would be not reflected easily (not via getOwnPropertyKeys), and 
would relationship-proxy as sketched in http://wiki.ecmascript.org/doku.php?id=strawman:relationships.

But note how that strawman accentuates the differences between unique 
and private symbols. But let's say we only have "private" symbols and 
their exposure is up to the reference holder: they can be exported from 
modules to become "public", published via the heap as named values, etc.

This seems to neatly separate concerns, but Arv pointed out that for 
some proxy cases it won't work. I forget what he said exactly, though. 
Cc'ing him.