ES accessor usage guidelines (Was: Map/Set.prototype.size)

Brendan Eich brendan at mozilla.org
Mon Oct 15 14:39:04 PDT 2012


David Bruant wrote:
> 2012/10/15 Brendan Eich <brendan at mozilla.org 
> <mailto:brendan at mozilla.org>>
>
>     * get/set accessor may have effects on 'set' (see the DOM) but
>     only on the receiver object (and unobservably,
>
> I think that "unobservably" will be very hard (if not impossible in 
> most cases) to achieve with proxies.
> "Unobservable except to the receiver handler if the receiver is a 
> proxy" sounds like a more achievable constraint.

Ok.

>     any children that become garbage, e.g. when trimming .length on an
>     array-like).
>
> I'm not sure I understand this part. Did you finish your sentence? 
> What does "children" mean here?

No, I meant truncating an array-like by setting .length to 0 may make 
garbage but (absent some weak-ref turn-based notification system) it 
can't be observed.

/be



More information about the es-discuss mailing list