I agree with him! Is for humman abstraction. An array or string byte position need to start from 0 because if you want no manipulate it, mathematical you need to count from 0, or some counts can be wrong!
Note, $. is used for warnings outup too!
But the idea to count from 0 in the real life!!! No! ;-/
We count to say how many things we have, math star from here. 0 was created, and a big invention, to can count bigger amounts, but with the same symbols, and to represent the null too! If we count from 0, we need to invent another "0" symbol for null!
I say again, we count arrays from 0 only to manipulate it better. Is easier to make an algorithm that count from 0!For example, the subsrt() command:
substr($var , 0 , 2) ;
substr($var , 2 , 2) ;
You use the 2 to say where the 1st substr ends and to say "where" the 2nd substr start! If we count from 1 you need to always recount the values for start and end:
substr($var , 1 , 2) ;
substr($var , 3 , 2) ;
Graciliano M. P.
"The creativity is the expression of the liberty". |