When should I use optionals and when should I use non-optionals with default values?
问题 I know the recommended way in Swift is to use: class Address { var firstLine : String? var secondLine : String? } but sometimes I see other developers write their code this way: class Address { var firstLine : String = "" var secondLine : String = "" } Is this the unrecommended way because whenever you have nil you will just crash and there's no outlet for your to recover. Is that right? Or there are some use cases where using non-optionals with default can be good. If so then where? I saw