4 ms·
You'll see this occasionally when you print out a value that contains optionals in the console. But in 10 years of writing Swift code, I've never had any reason
by turnsout 2y ago
You'll see this occasionally when you print out a value that contains optionals in the console. But in 10 years of writing Swift code, I've never had any reason to interact with the underlying enum case values.
I'm not sure why this should be surprising—the unwrapping operators are clearly syntactic sugar regardless of whether they're implemented in the standard library or in the Swift compiler.
- happytoexplain 2y agoI wish I could remember the specifics, but I have had cases where the compiler accepted `.none` but not `nil`. It's possible this has since been cleaned up, though.