On Jul 25, 2013 3:30 PM, "Brandon Benvie" <[email protected]> wrote: > > On 7/25/2013 1:31 PM, Erik Arvidsson wrote: >> >> https://gist.github.com/arv/0bbb184710016e00d56c >> >> The main goal of this proposal is to let us postpone the discussion >> about private state until ES7, making sure that we solve the main use >> cases. > > > Differences from Symbols: > > * enumerable
This is the only one I feel is relevant. > * visible to Object.getOwnPropertyNames Symbols are also visible (using getOwnPropertyKeys) > * no way to differentiate a unique string from any other string There is no difference. You could use a RegExp if you care (you should not care). > * no easy debug representation (since you can't differentiate from a string) Just print the string. Using symbols you would need to use symbol.name. For debuggers and dev tools, they can always special case. But that applies to both. > I'm curious why the desire to not have unique symbols? I was under the impression that private Symbols or relationships or whatever could be punted without affecting unique Symbols, which serve a different use case (name spacing and encapsulation, not security). This proposal covers name spacing while ignoring encapsulation. > > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

