Trailing Commas
Archie Cobbs
archie.cobbs at gmail.com
Thu Nov 30 23:44:20 UTC 2023
On Thu, Nov 30, 2023 at 5:17 PM Kevin Bourrillion <kevinb at google.com> wrote:
> Of course it makes some maintenance tasks (i.e. reordering lists) strictly
> easier. But I don't always see it mentioned that it also leads to smaller
> diffs, which makes "blame" info slightly more accurate, merge conflicts
> slightly less common, and code reviews slightly more efficient. Of course,
> "slightly" is charitable; it's a very small effect. Still, in my non-Java
> "fun" projects I use them all the time and it seems strictly worse not to.
>
My $0.03 (inflation)...
Your point about smaller diffs and reordering lists is correct, and (I'm
guessing) what originally motivated this feature.
However, that motivation only applies when the items you are listing are
normally or typically placed on separate lines.
That's true e.g. for enum constants, but not for the other stuff like
method parameters, etc.
-Archie
--
Archie L. Cobbs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20231130/78d9e108/attachment.htm>
More information about the amber-dev
mailing list