News for hackers. Stuff that matters.
Re:Regarding JavaScript trailing commas by bluejekyll on Saturday April 09, 2016 @09:43AM (#11461179)
For compiled languages like Rust, you might be correct, though even there I use trailing commas, specifically for the reason mentioned. It reduces bugs when you add or swap around array elements.

In a compiled language you catch this because it's a syntax error. In JavaScript, it might be missed through every code review (because it's subtle) and and then break on release to you production system.

So it's not just style, it can help reduce bugs.

There are no comments on this comment yet.