4 ms·
'zero' and '0' are the same label, for the digit 0. There is no advantage to re-defining it, in fact, it does the opposite. It's a good practice to define label
by waynesonfire 6y ago
'zero' and '0' are the same label, for the digit 0. There is no advantage to re-defining it, in fact, it does the opposite. It's a good practice to define labels for magic numbers to promote more maintainable code through the DRY / single source of truth principle, document the magic number through the label name, and improve code archeology by enabling searching by label.
These principles hold when the label given a clear and concise name--which is an art.
- jerf 6y agoHeh, try for #define 0 0
- a1369209993 6y ago> #define 0 0 That actually works on some implementations (the preprocessor grabs a token without checking that it's a identifier). I've seen: #define $ SOME_LINE_NOISE #define && HACKY_GARBAGE x = &&(y $ z); as well.