2 ms·
Yes, but those arrays are based on the concept of the mathematical vector. Whereas C and descendents see arrays as chunks of memory. In C arrays it makes sens
by VHRanger 7y ago
Yes, but those arrays are based on the concept of the mathematical vector.
Whereas C and descendents see arrays as chunks of memory.
In C arrays it makes sense to think of the index as an offset (0 elements away from the start, etc.).
In math its more consistent with classic matrix notation.
- goatlover 7y agoAgreed, what's weird to me is how high level languages like Python and JS adopted C's indexing. But I guess that's the huge C influence on the programming community. Most of us learn programming being taught zero-based indexing.