Trailing comma for function arguments and call parameters

Peter van der Zee ecma at
Tue Jul 8 05:05:28 PDT 2014

On Fri, Jul 4, 2014 at 12:52 AM, Dmitry Soshnikov
<dmitry.soshnikov at> wrote:
> Will it makes sense to standardize a trailing comma for function arguments,
> and call parameters?

Fwiw, it also makes sense in AMD, where the set of dependencies can
grow and the desire to put every module on its own line becomes
desirable. I tend to do it for the array since you can be consistent
with the leading/trailing comma there, but not so much for the func

Allowing an "empty" comma after the param list could fix that. Also
allowing one before for the "comma-first" people would be nice.

> But again, I already think that for the language itself, it won't be super useful just yet, since backward-incompatible syntax won't allow using it anyways for a long amount of time

This argument doesn't hold for server side approaches like node, or
build-step approaches like you use yourself.

Also, if you apply this argument to any new syntax the language never
changes, for better or worse ;)

Anyways, +1 from me. I'm tired of irrelevant diff lines...

- peter

More information about the es-discuss mailing list