`Android Kotlin Guidelines` states that "When a fu...
# language-proposals
i
Android Kotlin Guidelines
states that "When a function signature does not fit on a single line, break each parameter declaration onto its own line." From my observation there are certain cases where new line is also recommended - like (data) classes with multiple parameters in the constructor. Important advantage here is the fact that placing each parameter in new line makes code merge easier and often automatic. Because of that I wonder if someone before proposed to remove need of using
,
when method parameters are explicitly separated by new line?
Copy code
data class Test (
        val param1:String,
        val param2:String,
        val param3:String,
        val param4:String
)
Proposal
Copy code
data class Test (
        val param1:String
        val param2:String
        val param3:String
        val param4:String
)
👍 6
👎 7
r
What about annotations? if I have 2-3 usually each on new line
s
I'd rather use trailing commas.
3
i
It’s similar to
;
- you need it to define few variables in one line, but if you use variable in each line
;
is redundant. Anyway for me
,
is redundant as code intention is still straight forward. @rrader you could still have them why not - parsing this line should not be a problem.