2 ms·
> The only reasonable default value, sometimes, is all-zeroes (or all-ones...). That's very false. Consider a basic string container with a small-size optimiza
by kllrnohj 8y ago
> The only reasonable default value, sometimes, is all-zeroes (or all-ones...).
That's very false. Consider a basic string container with a small-size optimization. The default value for capacity is neither 0 nor 1, but the size of the inline array.
Similarly it could be an enum value, and the default for a given class isn't whatever the 0 value happened to line up with because that's arbitrary anyway. An example being a basic type id of a fixed number of types.