Optional type (?) and forced resolution operator (!)
? Is a syntactic sugar that is judged and then unpacked
! Is a kind of syntactic sugar for forced unpacking
Can you use it when you are not sure of a value?
Use when you have a value!
Several usage scenarios:
1. Declare the Optional value variable
2. Used in the operation of the Optional value to determine whether it can respond to subsequent operations.
3. Optional method for securely calling protocol
4. Use as? Downward Transformation (Downcast)
1. Forcibly unpacking the Optional value (unwrap)
2. Declare Implicitly Unwrapped Optionals values, generally used for attributes in classes