 Google C++ Style Guidewhat goals each rule is serving, it should be clearer to everyone when a rule may be waived (some can be), and what sort of argument or alternative would be necessary to change a rule in the guide. The benefit of a style rule must be large enough to justify asking all of our engineers to remember it. The benefit is measured relative to the codebase we would get without the rule, so a rule against a very processors smaller code usually runs faster due to better use of the instruction cache. A decent rule of thumb is to not inline a function if it is more than 10 lines long. Beware of destructors, which0 码力 | 83 页 | 238.71 KB | 1 年前3 Google C++ Style Guidewhat goals each rule is serving, it should be clearer to everyone when a rule may be waived (some can be), and what sort of argument or alternative would be necessary to change a rule in the guide. The benefit of a style rule must be large enough to justify asking all of our engineers to remember it. The benefit is measured relative to the codebase we would get without the rule, so a rule against a very processors smaller code usually runs faster due to better use of the instruction cache. A decent rule of thumb is to not inline a function if it is more than 10 lines long. Beware of destructors, which0 码力 | 83 页 | 238.71 KB | 1 年前3
 Google Java Style Guidebraces of an array initializer 8 • new int[] {5, 6} and new int[] { 5, 6 } are both valid This rule is never interpreted as requiring or forbidding additional space at the start or end of a line; it0 码力 | 19 页 | 84.76 KB | 1 年前3 Google Java Style Guidebraces of an array initializer 8 • new int[] {5, 6} and new int[] { 5, 6 } are both valid This rule is never interpreted as requiring or forbidding additional space at the start or end of a line; it0 码力 | 19 页 | 84.76 KB | 1 年前3
 Google Python Style Guidepossible. Definition: Python evaluates certain values as false when in a boolean context. A quick “rule of thumb” is that all “empty” values are considered false so 0, None, [], {}, '' all evaluate as false0 码力 | 30 页 | 94.81 KB | 1 年前3 Google Python Style Guidepossible. Definition: Python evaluates certain values as false when in a boolean context. A quick “rule of thumb” is that all “empty” values are considered false so 0, None, [], {}, '' all evaluate as false0 码力 | 30 页 | 94.81 KB | 1 年前3
共 3 条
- 1













