> Le 8 janv. 2016 à 16:28, Matthew Robb <[email protected]> a écrit :
> 
> I'd still love to have symbol syntax using the @ident form or something. (I'm 
> aware that it would likely conflict with the current decorators proposal).
> 
> 

What would be a concrete syntax? The following one seems nice:

```js
{
    symbol @foo;  // lexical declaration of symbol; roughly equivalent to: 
const __foo__ = Symbol('foo');
    a.@foo = b; // roughly equivalent to: a[__foo__] = b; where __foo__ is the 
symbol @foo declared above.
}
```

However, it is just a little sugar for something perfectly doable in ES2015. 
Personally, I prefer to keep the syntax complexity budget for truly new things 
like private state: https://github.com/wycats/javascript-private-state 
<https://github.com/wycats/javascript-private-state>

—Claude
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to