igor.wojda
08/22/2018, 10:33 PMAndroid 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?
data class Test (
val param1:String,
val param2:String,
val param3:String,
val param4:String
)
Proposal
data class Test (
val param1:String
val param2:String
val param3:String
val param4:String
)
rrader
08/23/2018, 11:23 AMSiebelsTim
08/23/2018, 12:41 PMigor.wojda
08/23/2018, 10:07 PM;
- 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.