[1] Source: I've written a JSON parser from scratch and think it would be valuable
- "blah"
+ "blah",
+ "blorp"
is far uglier than any trailing comma ever has been.Because it seems a lot easier to just design newer languages to be friendlier to version control than either of those. JSON has little excuse here, even when it was 'invented' it was a bad idea to simply run it through eval and pray it had nothing malicious or damaging in it, so compatibility with IE6's stupid parser wasn't really all that special. Never mind that it didn't take off as a really popular format until well after that was a concern.
And if a file is hand-edited, it's format should have niceties that make hand-editing more pleasant, like optional trailing commas, and comments.
By making the format more suited to hand-editing, you also make it better for diffing and VCS.
require([
- "blah"
+ "blah",
+ "blorp"
], function () {
AngularJS templates often can involve JSON structures for <select> and other UI junk.It'd be great if a backend could serve JSON structures directly to the Controller, which would inform the Directive's @attr template. So maybe the problem goes away in this regard, and the build could handle AMD/CommonJS wrappers which is outside of the version control layer to an extent — or at least wrappers do not necessarily have to be.
require([
"blah",
"blorp",
], function () {
I added ``blorp`` — I never removed ``blah`` except for some limitation of the language I'm using. Why should that be part of the organic record?