You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_Rationale:_ The type specifier is saying something about the _identifier_ so
93
+
_Rationale:_ The type specifier is saying something about the _identifier_ so
94
94
it should be positioned with it.
95
95
96
96
#### Only explicitly refer to `self` when required
@@ -124,3 +124,59 @@ extension History {
124
124
```
125
125
126
126
_Rationale:_ This makes the capturing semantics of `self` stand out more in closures, and avoids verbosity elsewhere.
127
+
128
+
#### Prefer structs over classes
129
+
130
+
Unless you require functionality that can only be provided by a class (like identity or deinitializers), implement a struct instead.
131
+
132
+
Note that inheritance is (by itself) usually _not_ a good reason to use classes, because polymorphism can be provided by protocols, and implementation reuse can be provided through composition.
0 commit comments