https://kotlinlang.org logo
#announcements
Title
# announcements
k

kevinmost

06/13/2017, 7:29 PM
As they pointed out, they conflated optional trailing commas and optional commas in general in the options, which means they can't read too much into those. I don't think anyone wants the latter, but I think the former would be really nice
p

poohbar

06/13/2017, 7:51 PM
kevinmost: Trailing commas look ugly and untidy to me. Even in JavaScript I use a lint setting that throws error on a trailing comma. If you need to move arguments around, I recommend ctrl+shift+alt+→ which takes care of the comma for you.
k

kevinmost

06/13/2017, 7:52 PM
I use IdeaVim and vim controls to reorder my params, so I can't rely on the IDE to move the comma. I'd also rather just have less noise in my diffs by being able to move lines without touching others, regardless of their position
p

poohbar

06/13/2017, 7:53 PM
well then your tooling is lacking ... the extra line in diff is less distracting to me than dangling commas
k

kevinmost

06/13/2017, 7:56 PM
I don't think I should have to rely on the tooling to reorder lines of code. I don't see trailing commas as a distraction at all. Would be interesting to see them in a future community survey if another one gets run, without the "all commas are optional" part, to see how it's received
m

mg6maciej

06/13/2017, 10:07 PM
All commas are optional is not implementable. It would be a breaking change to the language.
Copy code
listOf(1
+2) == listOf(3) // now

listOf(1
+2) == listOf(1, 2) // after
Optional trailing commas FTW.
l

louiscad

06/13/2017, 10:16 PM
@mg6maciej A really bad idea for code compatibility and that'd make multiline expression list elements not possible or not readable