Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


This is why you prepend the comma before every succeeding item in a list or map.


This 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.


You'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.


This seems to only move the problem to the first item instead of the last one, not solve it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: