More generally, all keywords are excluded, that makes sense in general as,
e.g., `{ if }` could not be equivalent to `{ if: if }`, or `{ yield }` inside a
generator function should not be equivalent to `{ yield: yield }`.
But yes, one could have special-cases for literals such as `this`, `true`,
`false` and `null`. It is an accident of history that `{ NaN }` and `{
undefined }` work as expected, but not `{ null }`.
—Claude
> Le 21 avr. 2017 à 19:01, Michał Wadas <[email protected]> a écrit :
>
> 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
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss