New private names proposal
Kris Kowal
kris.kowal at cixar.com
Thu Dec 16 13:58:25 PST 2010
On Thu, Dec 16, 2010 at 1:53 PM, David Herman <dherman at mozilla.com> wrote:
>
> function Point(x, y) {
> private x, y;
> this.x = x;
> this.y = y;
> ...
> }
>
> than
>
> function Point(x, y) {
> var _x = gensym(), _y = gensym();
> this[_x] = x;
> this[_y] = y;
> }
I tend to disagree with most developers, so take it with a grain of
salt that I find the latter form, with all the implied abilities,
easier to understand.
Kris Kowal
More information about the es-discuss
mailing list