The fact that you can use `?.let{}` as a `if` does...
# announcements
r
The fact that you can use
?.let{}
as a
if
doesn't mean it needs an
else
2
r
.let has an "else" but better to perforn mit .also ->
?.also {  /* do if not null */ } ?: run { /* do the else thing */ }
@Loránd @gildor @edwardwongtl
g
Yes, it’s looks ugly imo.
if
just much more clean way to do the same
r
that is question of taste - but the functionality of
if let else
in swift
g
Not exactly, you can handle only one value using
.let
in Kotlin
r
yes, but in
if let else
i think you can just pass one value in swift too - just with guard you can init multiple vals
g
no, as I know you can have multiple let in Swift But maybe I’m wrong
r
no you are right ^^
since 1.2