3 ms·
For large code bases, you don't break git blame by adding in new arguments. And it's one less thing to think about when editing your code: always add a comma, n
by mjmahone17 13y ago
For large code bases, you don't break git blame by adding in new arguments. And it's one less thing to think about when editing your code: always add a comma, never worry about errors because you need to add a comma to the line above.
- codehero 13y agoThis is why you prepend the comma before every succeeding item in a list or map.
- swift 13y agoThis is what I do, but it basically just has the effect of making the first item special instead of the last. That's usually better in practice, though.
- peferron 13y agoThis seems to only move the problem to the first item instead of the last one, not solve it.
- Pxtl 13y agoYou've slightly improved the problem by moving it away from the last item on the list, but you've now screwed up the first item. You can no longer insert a first-item using the same format, and instead of a trailing comma bug you can get a starting comma bug.