Skip to content

Commit 574c748

Browse files
committed
Naming example & external parameters
close kodecocodes#92 close kodecocodes#104
1 parent 2f789e6 commit 574c748

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

README.markdown

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ For functions and init methods, prefer named parameters for all arguments unless
6363

6464
```swift
6565
func dateFromString(dateString: String) -> NSDate
66-
func convertPointAt(#column: Int, #row: Int) -> CGPoint
67-
func timedAction(#delay: NSTimeInterval, perform action: SKAction) -> SKAction!
66+
func convertPointAt(column column: Int, row: Int) -> CGPoint
67+
func timedAction(delay delay: NSTimeInterval, perform action: SKAction) -> SKAction!
6868

6969
// would be called like this:
7070
dateFromString("2014-03-14")
@@ -75,9 +75,9 @@ timedAction(delay: 1.0, perform: someOtherAction)
7575
For methods, follow the standard Apple convention of referring to the first parameter in the method name:
7676

7777
```swift
78-
class Guideline {
79-
func combineWithString(incoming: String, options: Dictionary?) { ... }
80-
func upvoteBy(amount: Int) { ... }
78+
class Counter {
79+
func combineWith(otherCounter: Counter, options: Dictionary?) { ... }
80+
func incrementBy(amount: Int) { ... }
8181
}
8282
```
8383

@@ -606,6 +606,7 @@ This style guide is a collaborative effort from the most stylish raywenderlich.c
606606
* [Ben Morrow](https://github.com/benmorrow)
607607
* [Andy Pereira](https://github.com/macandyp)
608608
* [Ryan Nystrom](https://github.com/rnystrom)
609+
* [Andy Obusek](https://github.com/obuseme)
609610
* [Cesare Rocchi](https://github.com/funkyboy)
610611
* [Ellen Shapiro](https://github.com/designatednerd)
611612
* [Marin Todorov](https://github.com/icanzilb)

0 commit comments

Comments
 (0)