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

Alex Russell slightlyoff at
Wed Oct 17 07:15:03 PDT 2012

I agree (unsurprisingly) with Arv and Yehuda on this. Side effects are what
make the world go 'round. Getting overly prescriptive here is just a way to
box us into [not]using some particular stylistic form when designing
API...and I don't see how that settles any interesting questions. I'd much
rater we have debates as they arise about what is most
idiomatic/performant/etc. We can use the weight of precedent to inform
those discussions, but I'm pretty shocked that we would want to converge on
hard/fast rules about accessors.

On Tue, Oct 16, 2012 at 9:12 PM, Erik Arvidsson <erik.arvidsson at>wrote:

> On Mon, Oct 15, 2012 at 12:23 PM, Brendan Eich <brendan at>
> wrote:
> > * get/set accessor may have effects on 'set' (see the DOM) but only on
> the
> > receiver object (and unobservably, any children that become garbage, e.g.
> > when trimming .length on an array-like).
> That is very limiting, even as a guideline. Any time there are two or
> more related objects it is very likely that a setter might affect some
> other object.
> --
> erik
> _______________________________________________
> es-discuss mailing list
> es-discuss at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list