The wort part for me here is the people who simply ignore all points made by the author, simply saying “Let’s just stick with JSON” or “I don’t think comments are necessary”. It feels like they just saw the headline and commented without reading the text.
As the author, I appreciate that…though I probably should have expected as much :)
I’m generally a bit suspicious of both humans and machines modifying the same files, although comment preserving parser writers is something I have seen become more popular lately.
For myself, I think it just adds complexity that is unnecessary and probably supporting a less-good decision made earlier.
I’m generally a bit suspicious of both humans and machines modifying the same files
Go is no stranger to this, though. See: gofmt.
Gofmt is a trivial example, go fix, and the various go refactoring tools like the ones from x/tools/refactor and grind are more complex examples. Go programmers are used to tools that modify user-writable code.
I agree on the whole – though upon seeing the headline, I was thinking it was probably because they were up to something goofier, like retroactively redefining what a comment is to include things with actual semantic significance (as they’ve done before). At least it isn’t more of that.
I also think that’s a great general rule. In this particular case, I think - hope? - we’ve defended against it adequately.