Yehuda Katz wrote:
I feel somewhat strongly that this is an appropriate use of a setter. Using a method would give the API a static language feel for not enough win. In the case of a well-defined API with well-understood links between objects, a setter feels right to me.

I'm not super-religious here. In fact I suspect we (TC39, or any non-trivially small group formed from es-discuss participants) will not agree on "one true way".

JS is multi-paradigm. We're not as TimToady (http://en.wikipedia.org/wiki/There%27s_more_than_one_way_to_do_it) as Perl but we are definitely not narrow and pedagogical and prescriptive.

So maybe we should look for least common denominator rules. Map/Set.prototype.size as accessor still wins by any such.

/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to