Private Slots

Kevin Smith khs4473 at gmail.com
Wed Jan 16 10:50:10 PST 2013


Thank you Mark, for the GC hint proposal:  it matches what was my
(admittedly naive) intuition.  And thanks, Allen, for the thorough
description of GC issues.  Very helpful!

Some points, in no particular order:

- It seems likely to me that the implementation complexity of {private
symbols, weakmaps} will be on par with the implementation complexity of
{weakmaps with hints}.

- Reflectivity of all property names is a useful feature that should not be
discarded lightly.

- Simplicity in the object model is an advantage for everyone attempting to
reason about objects.

- Having one kind of symbol is easier to conceptualize than two.  Indeed,
private symbols could be an attractive nuisance if they lead developers
toward over-securing their abstractions.

 - Unique symbols provide sufficient encapsulation for software-engineering
purposes.

- It is my conjecture that high-integrity privacy will be required by a
small fraction of projects (such as SES sandboxing engines), and the
developer audience for these features will be "power-users".  In this case,
private symbols might be an over-optimization of a corner case (although
it's an important corner!).

- It looks to me like much of the work to make ES6 future compatible with
private symbols has already been done.

- During the ES7 design process, there will be plenty of user experience
with weakmaps and proxies to draw from.  This should make the private
symbol decision much clearer.


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


More information about the es-discuss mailing list