Comment on Ask HN: Do you prefer tailing or leading comma?Comments−compressedgas1yTrailing in languages which support ending the last item with a comma as this follows the usage of the semicolon. [ 1, 2, ] Leading otherwise as no language I can remember supports a leading comma on the first item: [ 1 , 2 ] The entire point of this is to avoid needing to edit the prior line when inserting items into an existing lexical list this makes the diffs just: + instead of: - + + If you don't care about how your line diffs look, don't bother. Just auto-format your code instead.
Comments
Trailing in languages which support ending the last item with a comma as this follows the usage of the semicolon.
Leading otherwise as no language I can remember supports a leading comma on the first item: The entire point of this is to avoid needing to edit the prior line when inserting items into an existing lexical list this makes the diffs just: instead of: If you don't care about how your line diffs look, don't bother. Just auto-format your code instead.