Trailing comma for function arguments and call parameters

Isiah Meadows impinball at gmail.com
Thu Jul 10 12:31:04 PDT 2014


On Tue, Jul 8, 2014 at 8:05 AM, Peter van der Zee <ecma at qfox.nl> wrote:

> On Fri, Jul 4, 2014 at 12:52 AM, Dmitry Soshnikov
> <dmitry.soshnikov at gmail.com> 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
> args.
>

I'll rescind my statement with that (although I don't usually use AMD).


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

I didn't even know that was not possible.


>
> > 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
>



-- 
Isiah Meadows
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140710/14af3f8d/attachment.html>


More information about the es-discuss mailing list