For the record, there are no so-called private symbols. The concept being referred to here is an implementation-only concept for naming an internal property. These naming-things are never reified and available to JS code and must not be.
On Thu, Jul 2, 2015 at 1:22 AM, Andreas Rossberg <[email protected]> wrote: > On 1 July 2015 at 17:12, Domenic Denicola <[email protected]> wrote: > >> Similarly, for several V8 built-ins, private state is not done via the >> allocator at all, but instead via "private symbols" that act quite similar >> to data properties. They can be added or removed at any time. In short, >> they're much more part of initialization than of allocation. >> > > For the record, the ability to do this is rather an incidental consequence > of private symbols. We don't remove private state anywhere, nor did I > intend it to be used that way. There is one case where we add a private > field dynamically (attaching a stack trace to a thrown object), but that is > a half-broken hack anyway. > > I'd love to have a proper allocation-time notion of private state, like > Allen & Kevin suggest. You still have weak maps for more dynamic relations. > > /Andreas > > > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss > > -- Text by me above is hereby placed in the public domain Cheers, --MarkM
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

