Private Slots

Sam Tobin-Hochstadt samth at ccs.neu.edu
Mon Jan 14 08:32:59 PST 2013


On Mon, Jan 14, 2013 at 11:28 AM, Kevin Smith <khs4473 at gmail.com> wrote:
>> I (as one of the people who has advocated for symbols) disagree
>> entirely.  The JS object model extension required for symbols is small
>> -- JS objects now map from either strings or symbols to values (plus
>> prototype inheritance, getters, setters, configurability,
>> writeability, and the other aspects of the JS object model the quote
>> below glosses over).
>
> You've misunderstood the distinction between private slots and (unique)
> symbols.  Symbols are fine.  I'm taking issue with the *new kind of slot*
> that is created when using a private symbol.

There is no "new kind of slot".  Symbols, private and otherwise, go in
exactly the same kind of slot as any other object property.  As Allan
points out, this is clear in the object model portion of the spec,
which does not distinguish any "new kind of slot".

Sam


More information about the es-discuss mailing list