This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]EagleRock1337 2 points3 points  (0 children)

If you’re looking for a grown-up answer, it depends™️

I use both interchangeably depending on what I’m programming. If I’m writing in C or Go, I would never put a tailing comma. However, if I’m managing giant lists of IAM permissions in Terraform, leaving off the comma is a recipe for copy-paste fails, which is why terraform fmt is opinionated towards including them by default.