Because the shorthand only requires an Identifer, and an IdentiferName is not 
sufficient. If the rule allows arbitrary IdentiferName, then we will also allow 
`{if}`, which makes no sense it all. So if we really want to allow this, it 
would be a special rule in addition to the current rule. In this sense, we are 
not forbidden the use of `{this}`, but instead we don't have the rule to allow 
that.

________________________________
From: es-discuss <[email protected]> on behalf of Michał Wadas 
<[email protected]>
Sent: Friday, April 21, 2017 6:01:37 PM
To: [email protected]
Subject: {this} object literal

Hi.

Is there any specific reason why {this} literal is forbidden? Babel had a bug 
allowing this and it was pretty convenient to enter console.log({this, 
arguments, externalVar}) for quick printing scope.

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

Reply via email to