3 ms·
That the data he chose can be expressed as a range is utterly inconsequential. The values are never even used. In all likelihood, the author just wrote for
by sjolsen 11y ago
That the data he chose can be expressed as a range is utterly inconsequential. The values are never even used. In all likelihood, the author just wrote
for (auto item : {})
and then filled in the first sequence of numbers that popped into his head.
- fauigerzigerk 11y ago>That the data he chose can be expressed as a range is utterly inconsequential It could be, but we don't know that. And that's exactly my point. The syntax he uses forces us to think and even speculate about that. So for the particular sequence he chose for his example, it would be less ambiguous to generate the range algorithmically.