On Tue, Jan 22, 2013 at 11:13 AM, Brandon Benvie <[email protected]>wrote:
> I also agree with everything that Nathan said. > > To clarify, there's Symbols and then there's private Symbols. I don't > think anyone in TC39 is suggesting the removal of Symbols in general. > Private Symbols have a much more specific set of uses cases than do just > Symbols in general, and regular Symbols will accomplish the goal of > encapsulation. > No, symbols accomplish the goal of stratification [1] (I've used this terminology in the past and was corrected but from a mathematical logic standpoint this property is precisely what symbols give us). Unique symbols fail as a means of encapsulation -- and this is whole point of private symbols. > Regular symbols are only enumerated by a new ES6 function and are unique. > Currently, the only difference between a normal symbol and a private Symbol > is that private symbols are not enumerated by getOwnKeys and they are > slated to eventually be awkward to use with proxies. Otherwise a normal > (aka Unique) Symbol works exactly the same. > You're awkwardly (and derisively) describing what could more concisely be called "encapsulation". This is the difference between unique and private symbols, as Nathan expressed beautifully. [1] http://en.wikipedia.org/wiki/Stratification_%28mathematics%29
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

