shortcuts for defining block-local private names, plays nicely with @foo syntax
Brendan Eich
brendan at mozilla.org
Mon Jan 23 01:23:51 PST 2012
> Axel Rauschmayer <mailto:axel at rauschma.de>
> January 23, 2012 1:21 AM
>
> I wouldn’t mix public and private, but it would be nice to have
> symmetry – only having a `this` shortcut for private names feels odd.
> How about the following?
>
> function Point(everyone, secret) {
> this.everyone = everyone;
> this. at secret = secret;
> }
>
> //---- Short:
>
> function Point(everyone, secret) {
> .everyone = everyone;
You're requiring manual semicolon insertion before lines like this.
Consciously?
/be
>
More information about the es-discuss
mailing list