5 ms·
Not sure of the exact motivation, but Swift uses exclamation mark to unwrap optionals.
by angry_cactus 6y ago
Not sure of the exact motivation, but Swift uses exclamation mark to unwrap optionals.
- oefrha 6y 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.