Skip to content

Commit 296e913

Browse files
Changed "closure" to "closure expression" in a few locations
see kodecocodes#35 Note, Closure Expressions create Closures, hence the two terms can be used interchangeably in many instances. Apple does this in their language reference, e.g. they use "trailing closure syntax" rather than "trailing closure expression syntax". However, there are a few instances in our style guide where I think 'Closure Expression' makes more sense.
1 parent 4232e52 commit 296e913

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.markdown

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Writing Objective-C? Check out our [Objective-C Style Guide](https://github.com/
1515
* [Classes and Structures](#classes-and-structures)
1616
* [Use of Self](#use-of-self)
1717
* [Function Declarations](#function-declarations)
18-
* [Closures](#closures)
18+
* [Closure Expressions](#closure-expressions)
1919
* [Types](#types)
2020
* [Constants](#constants)
2121
* [Optionals](#optionals)
@@ -193,7 +193,7 @@ The example above demonstrates the following style guidelines:
193193

194194
For conciseness, avoid using `self` since Swift does not require it to access an object's properties or invoke its methods.
195195

196-
Use `self` when required to differentiate between property names and arguments in initializers, and when referencing properties in closures to make capture semantics explicit:
196+
Use `self` when required to differentiate between property names and arguments in initializers, and when referencing properties in closure expressions (as required by the compiler):
197197

198198
```swift
199199
class BoardLocation {
@@ -230,7 +230,7 @@ func reticulateSplines(spline: [Double], adjustmentFactor: Double,
230230
```
231231

232232

233-
## Closures
233+
## Closure Expressions
234234

235235
Use trailing closure syntax wherever possible. In all cases, give the closure parameters descriptive names:
236236

0 commit comments

Comments
 (0)