Hacker News new | ask | show | jobs
by jaybuff 3724 days ago
Ah, yes, the trailing comma in a list, which I like to refer to as the "Silicon Valley Comma"

[ "a", "b", "c", ] // the silicon valley comma

3 comments

Of course it looks ugly if you list things horizontally... :)
If that's the Silicon Valley Comma, what do you call this?

    [
       "an
     , "array"
     , "of"
     , "things"
    ]
Because I have an irrational hatred of that style. (Yes, I know the purported benefits when diffing files, I don't care :P)
That's not as good as the SVC because you'll still get unnecessary diffs when prepending to the list

SVC allows you to both prepend and append without adding extra diffs

It's a nice thing to have when you generate JSON programmatically :)