Just to confirm: you are not alone. I always thought that allowing to imply
local this (‘this.’) was a bad idea (C#). Seriously, this is not 5 chars
that’ll hurt but it could make IDE work a lot easier, and it make code reuse
more efficient (if you need to copy/paste some code, if you stay in the same
class, it will work as intended, not if a function argument can override the
class field). It also brings symetry to the code (this.a==other.a).
From: Axel Rauschmayer
Sent: Monday, January 23, 2012 10:26 AM
To: Brendan Eich
Cc: ECMAScript discussion
Subject: Re: shortcuts for defining block-local private names,plays nicely with
@foo syntax
function Point(everyone, secret) {
.everyone = everyone;
You're requiring manual semicolon insertion before lines like this.
Consciously?
Sight. Right. Not a good idea, then.
An important consideration is that eliminating `this` will increase the
grawlix-factor of JavaScript (I always liked the explicit `this`, especially
compared to Java).
--
Dr. Axel Rauschmayer
[email protected]
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
--------------------------------------------------------------------------------
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss