I’m sorry that it felt that way. I have no intention of telling anyone off about style. Instead, it might help if I share some of my experiences when I used to code in that style with comma separated variables.
Long ago when I used comma separate variables, there were several areas of pain. One of those painful areas was that when variables are added to the start or the end of the list of variables, multiple lines need to be edited. That also means that it’s more difficult to reorder the list of variables too, because you’re sometimes having to change three lines just to move something elsewhere.
// before
var temp,
num1,
num2;
// after
var num1, // adding var to this line
num2, // changing semicolon to a comma
temp; // removing var, and changing comma to semicolon
I didn’t know that they were painful at the time, just thinking that this is how it always is, until someone pointed it out to me. All of those changes make it in to github too, adding unwanted complexity to simple changes. Using a different coding standard made those changes much easier to achieve.
// before
var temp;
var num1;
var num2;
// after
var num1; // no change needed
var num2; // no change needed
var temp; // no change needed
None of that is major, but on adopting a beginner style with separate variable declarations, all of that pain and annoyance just vanished. It was like coming full circle after having tried different things. The difference was amazing.
My main reason for that hasn’t been all that clear. Some of it is because it’s easier to receive criticism from a computer than it is to receive it from a person. Other aspects are that its recommendations seem to make sense. And at first when some didn’t seem to make sense, such as always enforcing spaces over tabs, that helped me to investigate and learn that it 's about reducing conflict between different people working on the same code. Little to no benefit occurs when someone rewrites all of the code to match their own personal coding style before working on the problem with the code. And that was difficult to accept. That meant removing my personality from the code. But when it results in code that is easier to work with and is easier to reason about? It still hurts, like losing a loved one. But now that I’ve aligned myself with a rigorous standard, that helps to free me up to deal with other things. When questions come in about why this or why that, we don’t have to get into religious arguments about tabs vs spaces, comma-separated vs semicolon, or this-keyword vs named variables. Instead we can just point to the standard and say that’s how it’s done. On reflection it’s like trading several different religious grounds for one religious ground, but it does result things being much easier to explain, and justify.
On reflection the main reason is that aligning with a coding standard gives me a Better Answer ™ when questions arise about different style issues. There are several different types of style guide standards to choose from too. I don’t think that it’s suitable to pick and choose different parts from among them, but there being several types of standards should make it easier to find one that you agree with more than others.
And apologies for the wall of text. It’s been a long lockdown.