Nontrailing separators do not spark joy

15 points by fanf


masklinn

The JSON grammar specifies that a comma can separate two members of an object but not postcede ("trail") a member. I think this was a design mistake.

There are lots of things you can call it, but "a design mistake" is not one of them, because it was not a choice: JSON was created circa 2000~2001 as a subset of ECMAScript 3, the informational RFC 4627 was written in 2006. That it was a subset of javascript and worked out of the box in browsers (via eval) was both its very purpose and critical to its success, native JSON APIs were only added to browsers in 2009.

Trailing commas were specified in ES5, published December 2009.

JSON-with-trailing-commas could not have existed, because it would not have been fit for purpose.

zaphar

I 100% agree. Any new language that doesn't have trailing separators get's a small negative mark from me. Not enough to make me hate the language's syntax but it's a papercut.