2 ms·
For anyone that spends significant time using these languages, those mental mappings are as natural as the one you seem to think is obvious - then the additiona
by hgomersall 4y ago
For anyone that spends significant time using these languages, those mental mappings are as natural as the one you seem to think is obvious - then the additional advantages of the approach become apparent.
Exclusive upper bounds mean slices work neatly: a[0:10], a[10:20], a[20:30] etc. That's very neatly represented in a loop from zero in steps of ten. That pattern turns up all over the place when accessing arrays.
I've spent enough time in MATLAB to have been scarred by that kind of array slicing and off-by-one errors.