2 ms·
Not sure of the exact motivation, but Swift uses exclamation mark to unwrap optionals.
by angry_cactus 7y ago
Not sure of the exact motivation, but Swift uses exclamation mark to unwrap optionals.
- oefrha 7y agoIn Swift optional types are marked by a question mark (exactly as I suggested). Unwrapping an optional makes it non-optional, so the exclamation point has the opposite meaning.