Small style additions
dc71074b619f4c856843514a88bb2c156fe8dd20e5174dbce06bdb2c22cc1de2
1 parent
dee95968
STYLE
+5 -0
| 24 | 24 | * Name fields after their role in the abstraction, not after an incidental implementation detail. |
|
| 25 | 25 | * Name callbacks after what the caller is asking them to do. |
|
| 26 | 26 | * When wrapping a lower-level operation, choose a name that distinguishes the wrapper from the operation it delegates to. |
|
| 27 | 27 | * Keep function names short, but not at the cost of hiding important context. |
|
| 28 | 28 | ||
| 29 | + | WHITESPACE |
|
| 30 | + | ||
| 31 | + | * Don't inline blocks like `if x { return true; }`, always return after `{`. |
|
| 32 | + | * Don't add a blank line after a closing `}` inside a function. |
|
| 33 | + | ||
| 29 | 34 | HELPERS |
|
| 30 | 35 | ||
| 31 | 36 | * Do not create small helper functions when they are only used in one place. |
|
| 32 | 37 | * Generally avoid one-line helpers, unless it's a complicated line. |
|
| 33 | 38 |