Private Slots

Kevin Smith khs4473 at gmail.com
Mon Jan 14 07:57:02 PST 2013


When a property is added to an object using a private symbol, it creates a
new kind of slot:  a private slot.  It is clear from the design of the
Proxy API that this represents a fundamentally new extension to the ES
object model.

On the very first paragraph of the CoffeeScript homepage, we read:

> Underneath all those awkward braces and semicolons,
> JavaScript has always had a gorgeous object model at
> its heart.

It seems to me that any changes or extensions to the ES object model should
be justified by well-documented application-focused use cases, clearly
illustrating the need for such a change.

I would personally like to see answers to the following questions:

- Do private slots enable applications that would otherwise be impossible?

- What are some examples of real-world applications where the runtime
security of private slots is necessary?

- In those applications, are there acceptable methods of achieving the same
results which do not rely on extending the object model?

- If GC performance is a significant motivator, then can this supposed
benefit be quantified?

{ Kevin }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130114/1bc91246/attachment.html>


More information about the es-discuss mailing list