In Swift if I do: ``` class A { var b = B() } ...
# announcements
m
In Swift if I do:
Copy code
class A {
    var b = B()
}

class B {
    var value = 5
}

let a: A? = A()

let foo = a?.b.value // I don't have to put ? after b and whole expression has Int type
In Kotlin I would have to do
val foo = a?.b?.value
and the whole expression would be an
Int?
. Is any of these approaches better? And why if so?