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.
[ Parent
| on HN ]
Unless you're inserting as the first line ...
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