Originally Posted By: HellThunder
Please start counting with 0. If you have an array with a length of 100 - the first variable is always 0 and the last one 99. Sounds a little bit strange but do it to prevent memory leaks.

This has nothing to do with memory leaks. If you don't touch the first element in an array, it won't do anything. It does decrease readability and maintainability, especially for outside developers, but tough luck for them I suppose.

The real reason you start with index 0 is because otherwise you are simply wasting an element. And are probably overwriting memory at the end.

The reason why it is 0 is also not strange in any way shape or form, the index is simply an offset into the array. The first element logically has the offset 0 because it is at the very beginning.


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com