Is there way to enable trailing comma in `buildSrc...
# gradle
t
Is there way to enable trailing comma in
buildSrc
(Kotlin
1.4.32
, Gradle
6.8.3
)?
e
no, either use Gradle 7 or migrate your code out to a separate includedBuild which uses Kotlin 1.4 with API version 1.3
v
Or just don't follow that horrible practice. :-D
t
why is it horrible? 🤔
v
just subjective perceiving I very much dislike trailing commas they are ugly and always look like something is missing, some line too much deleted, some thought not finished, ... in my projects they are generally forbidden whether a language allows it or not I don't see any benefit of using them, not even the "better diffability" many like about them being able to reorder lines without problem is no argument at all as a proper IDE can handle the commas properly in that case
j
Duplicate lines, easier to see them in a code review too. I prefer them
g
I was pretty sceptical about trailing commas before, but when I started to use them, it so much easier in many cases, when you duplicate, delete lines, merge etc, just a bit less actions with adding/removing commas
âž• 4
v
Well, as I said, it is a totally subjective opinion. I also used them in code bases where they are enforced and I always disliked them and they poke me in the eye. :-)
e
not a Go user, I presume. (syntax mandates trailing commas)
v
No, not yet 🙂
f
Stay away and do Rust, Go is a useless language.
👎 1