8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65797b5 commit e62e45bCopy full SHA for e62e45b
README.md
@@ -134,6 +134,17 @@ func makeCoffee(type: CoffeeType) -> Coffee { ... }
134
_Rationale:_ The type specifier is saying something about the _identifier_ so
135
it should be positioned with it.
136
137
+#### When declaring a dictionary type, always associate the colon with the key
138
+
139
+When specifying the type of a dictionary, always put the colon immediately
140
+after the key type, followed by a space and then the value type.
141
142
+```swift
143
+let capitals: [Country: City] = [
144
+ Sweden: Stockholm
145
+]
146
+```
147
148
#### Only explicitly refer to `self` when required
149
150
When accessing properties or methods on `self`, leave the reference to `self` implicit by default:
0 commit comments