Has anyone seen something like ``` val foo = bar ?...
# getting-started
g
Has anyone seen something like
Copy code
val foo = bar ?: null.also { /* do something only when null */ }
o
run
?
g
That makes more sense to me, but we're now arguing here if that
?: null.also
approach would perform better than the if check
It looks like microoptimization that the compiler can get ahold of
👍 1