On Jul 3, 2014, at 3:52 PM, Dmitry Soshnikov <[email protected]> wrote:
> Hi,
>
> Will it makes sense to standardize a trailing comma for function arguments,
> and call parameters?
>
> We have it for Array and Object initialisers, and people like using them for
> long lists with prediction of new items adding in the future:
>
> ```
> var modes = [
> read,
> write,
> ];
>
> var platforms = {
> web,
> canvas,
> };
> ```
I suspect, but brendan could tell us otherwise, that the allowance of trailing
commas is a result of a bug in the _early_ _early_ days of JS, which then got
matched by the wonders of bug for bug compat, and so became necessary for web
compatibility.
Also, i’m not sure that your intended uses is sufficiently compelling to
justify non-backwards compatible syntax (i’m not against adding new syntax, i
just feel that it needs to have substantial benefits)
Hence, i don’t think this should be extended to other constructs.
—Oliver
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss