Closed
Description
I just updated my Candy Crush tutorial to Swift and found that referencing function names from the text can be awkward.
For example, I have the method:
func convertPointFromColumn(column: Int, row: Int) -> CGPoint
This uses the style where the first argument is named as part of the function name.
So in the text, should I refer to this as:
convertPointFromColumn()
convertPointFromColumn(row:)
convertPointFromColumn(column:, row:)
The first one is the shortest but also incomplete because row:
is part of the function name.
The second one might be misleading because a reader may think row:
is the argument, not part of the name.
The third one is the most correct, but also the longest and "noisiest".
Note that Xcode calls this method convertPointFromColumn(_, row:)
. That's also an option but not a very nice one...
Metadata
Metadata
Assignees
Labels
No labels