Skip to content

Commit 82623c9

Browse files
authored
Expand and reframe discussion of optionals (#143)
- Reframe the discussion of optional unwrapping to not conceptually rely on force unwrapping. - Highlight the value of non-optional types *never* being nil, and how you can't forget to handle nil on an optional. - Explicitly list the ways you can handle a `nil` value, and briefly introduce the `??` operator. - Explain when you should consider using force unwrapping. - Reduce the comparison to C and Objective-C. - Fix some mis-use of note boxes, where they were highlighting information instead of asides that readers can choose to skip. Fixes: rdar://41014749
2 parents 0d09210 + f990214 commit 82623c9

File tree

2 files changed

+162
-96
lines changed

2 files changed

+162
-96
lines changed

Style.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,10 @@ For example:
171171
If the operator doesn’t have an established English name,
172172
make sure you get tech review on the name you invent for it.
173173

174+
## optional binding
175+
176+
Omit the article: "use optional binding", not "use an optional binding".
177+
174178
## passive voice
175179

176180
In general,

0 commit comments

Comments
 (0)