Private Slots

Kevin Smith khs4473 at
Mon Jan 14 08:28:22 PST 2013

> 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.

The reason that the Proxy API is complex from the perspective of
> private symbols is that combining reflection with encapsulation and
> object-capability based security principles is a tricky and
> less-well-explored domain.  Fortunately, Tom as well as others have
> done an excellent job with this design, and I'm confident in it.
> However, that complexity is *not* the same as complexity in the
> fundamental object model.

I disagree.  The proxy design reflects the complexity of the underlying
object model.  And the proxy design is not the only place where the
complexity is apparent.  What about "freezing" that is no longer "freezing"?

In any case, my point still stands:  changes to the object model should be
thoroughly justified.

{ Kevin }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list