Files
linux-workspace/doc/kotlin-coding-guideline.md
2020-09-30 08:23:39 +02:00

344 B

value.?let or if (value != null)

Is really better to use

value?.let {
     // some block
}

then

if (value != null) {
    // some block
}

There is no return value so block is NOT expression.

Don't use anonymous class implementation

val value = object : Type {
    // implementation
}