Note that something similar was given serious consideration by TC39 for ES6 but 
was ultimately being rejected: 
http://wiki.ecmascript.org/doku.php?id=harmony:concise_object_literal_extensions
 
<http://wiki.ecmascript.org/doku.php?id=harmony:concise_object_literal_extensions>
 

You can probably find relevant discussions in the es-discuss archive and TC39 
notes.

Allen





> On Jul 8, 2017, at 12:09 AM, Raul-Sebastian Mihăilă <raul.miha...@gmail.com> 
> wrote:
> 
> I'd like to propose the following syntax:
> 
> ```js
> const obj = {
>   x:| 3, // non-writable property with value 3
>   y:] 4, // non-configurable property with value 4
>   z:} 5 // non-writable non-configurable property with value 5
> };
> ```
> 
> Perhaps class fields could also use this syntax. Maybe decorators can take 
> care of this but should you really need to use a decorator for something so 
> basic?
> _______________________________________________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss

_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to