Fully Represent Multi-Part Values in Variables [VA7]
Tip VA7
Many programming languages have evolved to allow storing “multiple” values in variables via things like “pairs” or “tuples.” When this occurs, make sure to fully represent these values in variable names.
Consider the following code:
If you have a variable that is a tuple with many values, trying to name them all may result in a name that is too long to be practical. In such a case, you might be able to find a suitable higher-level abstraction for the variable name, but you have to be careful - another programmer still needs to be able to use all of the values in a tuple. Redesigning the code - potentially by creating a custom data type with well-named fields for each value in the tuple - may be a better solution.