I’ve literally never understood this. ```val foo =...
# codingconventions
s
I’ve literally never understood this.
Copy code
val foo = Foo(
    bar,
    baz,
    qux
)
“so readable” “looks right” “as god intended”
Copy code
val foo = Foo(
    bar,
    baz,
    qux,
)
“ew gross” “_literally_ unreadable” “`parse error: Expected another key-value pair`”
😆 6
c
which one do you think looks better?
s
I think they look just about the same. If I had to pick one, then sure, I’d go with the trailing comma ’cause it provides a few benefits
one dangling comma boi is not going to ruin my ability to read or review this code
💯 6
6
k
I though this was already allowed in the latest versions
t
@Shawn All this argument just because of one comma?
a
It is useful when copy pasting lines - cause the comma gets pasted to and you don't have to backspace it I still prefer the no comma tho
<insert civil war meme here>
d
Given that it’s just three arguments and the names are quite short, I’d put them all on one line 😅 and then the trailing comma on single line looks weird, so
Copy code
val foo = Foo(bar, baz, qux)
👍 1