3 ms·
I've noticed this formatting in sql scripts before too - the biggest benefit I see is making source control diffs only show one line changed rather than two whe
by p1necone 8y ago
I've noticed this formatting in sql scripts before too - the biggest benefit I see is making source control diffs only show one line changed rather than two when adding/removing lines.
- deleted 8y ago[deleted]
- edflsafoiewq 8y agoIs that a benefit?
- PudgePacket 8y agoYes. When you git blame a line you won't get a commit just adding/removing a comma changing on that line.
- newaccoutnas 8y agoSome languages/DSL's allow for a comma at the end of the list too, thereby getting the same result but without the slightly strange comma at the start of the line. Adding additional lines is simple then and doesn't cause the line above to be pulled in to any git action
- PetahNZ 8y agoMaybe git blame should get better.
- barbwire 8y agoUnless you're inserting as the first line ...
- Ace17 8y agoThe benefit (compared to more classic formatting) only occurs if you're inserting at the end of the argument list. If adding stuff to the end of a class or of an argument list is your most frequent case, you might have a software design problem.