Ducks, Rabbits, and Privacy
dean at deanlandolt.com
Tue Jan 22 10:29:38 PST 2013
On Tue, Jan 22, 2013 at 11:13 AM, Brandon Benvie
<brandon at brandonbenvie.com>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
No, symbols accomplish the goal of stratification  (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
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss