Will any new features be tied to constructors?
erights at gmail.com
Thu Jul 2 14:31:19 UTC 2015
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 <rossberg at google.com>
> On 1 July 2015 at 17:12, Domenic Denicola <d at domenic.me> 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.
> es-discuss mailing list
> es-discuss at mozilla.org
Text by me above is hereby placed in the public domain
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss