Designed for safety:
Swift is designed for safety. By default, Swift objects can never be nil. But there are scenarios where nil is valid and needed. To handle such, innovative approach called Optionals. Swift syntax forces you to use ? to safely deal.
Cases:
1. A collection can be empty.
Swift is designed for safety. By default, Swift objects can never be nil. But there are scenarios where nil is valid and needed. To handle such, innovative approach called Optionals. Swift syntax forces you to use ? to safely deal.
Cases:
1. A collection can be empty.
Comments
Post a Comment