I feel like if you need an else case for `let` the...
# android
q
I feel like if you need an else case for
let
then you don't need
let
at all, what you want is really the classic if-else
a
quiro: I hate to write if else. 🙂
q
@audhil can you write the snippet of code you'd want to replace with
let
? Maybe there's a better way
a
Copy code
var session: String? = null
        session?.let {
            //  do something
        }
        else{
            //  do something other
        }
q
yes, probably you just need an if-else. Anything else would make it just more unreadable to me
a
ok, thanks @quiro