News for hackers. Stuff that matters.
Re:3D Game Shaders for Beginners by p1necone on Monday May 13, 2019 @01:09AM (#19896562)
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.
Re:3D Game Shaders for Beginners by barbwire on Monday May 13, 2019 @03:13AM (#19896926)
Unless you're inserting as the first line ...
Re:3D Game Shaders for Beginners by Ace17 on Monday May 13, 2019 @08:23AM (#19898537)
The 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.

Re:3D Game Shaders for Beginners by edflsafoiewq on Monday May 13, 2019 @03:05AM (#19896904)
Is that a benefit?
Re:3D Game Shaders for Beginners by PudgePacket on Monday May 13, 2019 @03:09AM (#19896911)
Yes. When you git blame a line you won't get a commit just adding/removing a comma changing on that line.
Re:3D Game Shaders for Beginners by newaccoutnas on Monday May 13, 2019 @04:19AM (#19897148)
Some 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
Re:3D Game Shaders for Beginners by PetahNZ on Monday May 13, 2019 @05:04AM (#19897328)
Maybe git blame should get better.