3 ms·
I think it's worth observing that a number of these are just common-sense guidelines for good programming practice, rather than being specific to C++. For examp
by teraflop 11y ago
I think it's worth observing that a number of these are just common-sense guidelines for good programming practice, rather than being specific to C++. For example:
"Use exceptions for error handling only"
"Avoid data races"
"Prefer a for-statement to a while-statement when there is an obvious loop variable"
"Don't pass structured data as strings"
"Eliminate redundant indirections" (for performance)
and so on. These don't really lend themselves to automatic checking, but it's still nice to see them written down in one place along with the more language-specific stuff.
- ant6n 11y agoOf course in Python, you're encouraged to use exceptions as part of the normal program flow. (For example in duck typing, rather than checking whether your value is of a certain type, just assume it is, and deal with possible exceptions if it isn't)