Re:SQLite Release 3.42.0
by givemeethekeys on Tuesday May 16, 2023 @11:39AM
(#35963350)
Why would you put a trailing comma when there's nothing after it? A comma isn't a period :-/
When manually modifying JSON, it really helps avoid accidentally missing a comma when you add or reorder elements.
JSON isn't English. The comma doesn't mean what it does in English, so I don't see why a period would be appropriate either.
Re:SQLite Release 3.42.0
by dangerlibrary on Tuesday May 16, 2023 @11:48AM
(#35963494)
Because it follows the general principle of making it easier to change [0]. Fewer edits, cleaner diffs.
Useless from the perspective of a wire format, but nice for things like config files, which seem to be the use cases json5 is targeting.
[0] Bullet pt 3: https://betterprogramming.pub/5-essential-takeaways-from-the...
Makes copy-pasting and reordering lines easier, which is quite handy.
Re:SQLite Release 3.42.0
by everybodyknows on Tuesday May 16, 2023 @12:44PM
(#35964382)
Simplifies JSON-generation code, typically saving a conditional.
Re:SQLite Release 3.42.0
by lordgrenville on Tuesday May 16, 2023 @02:15PM
(#35965598)
Just noticed today that the Python formatter "black" does this, I really disagree. Of course I realise that by noticing its changes and arguing about them I am missing the whole point of using it.
recursing issue since forever,
"separator" v.s. "terminator" both can work.
For data rows, I prefer termination as makes missing columns explicit.
But being optional here, it means nothing.
I guess it facilitates low effort scripting that doesn't have to treat the last element differently.
Any arguments against this one? My knee jerk reaction is 'yay'