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

Allen Wirfs-Brock allen at
Mon Oct 15 11:03:45 PDT 2012

On Oct 15, 2012, at 10:18 AM, David Bruant wrote:

> 2012/10/15 Brendan Eich <brendan at>
> * 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.
> 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?

I think something like "may only have an observable effect on the receiver object" is closer to what we want.  The abstraction represented by an object may well use other objects as part as its internal implementations and a setter might change the state of such implementation objects.  However, the implementation should not expose any such secondary objects in manner that such effect could be observed by outsiders.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list