5 ms·
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
by jaybuff 10y 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
- Retra 10y agoOf course it looks ugly if you list things horizontally... :)
- function_seven 10y agoIf 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)
- cheapsteak 10y agoThat'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
- Mikhail_Edoshin 10y agoIt's a nice thing to have when you generate JSON programmatically :)