Re^2: why the array index has to start at 0??
by Anonymous Monk on Oct 13, 2013 at 06:41 UTC
|
| [reply] |
|
| [reply] |
|
| [reply] |
|
|
Re^2: why the array index has to start at 0??
by Anonymous Monk on Dec 21, 2012 at 08:10 UTC
|
| [reply] |
|
| [reply] |
Re^2: why the array index has to start at 0??
by targetsmart (Curate) on Jun 23, 2009 at 10:27 UTC
|
IMO it makes much sense for the array to have the first index at 1.
we never call first as "0", we always call first as '1'. so this lead to this thinking.
Vivek
-- 'I' am not the body, 'I' am the 'soul', which has no beginning or no end, no attachment or no aversion, nothing to attain or lose.
| [reply] |
|
It might make sense to you, but chances are that it won't for the maintainers of your code. Arrays in most languages I know start at index 0, I am not sure going against such a common characteristic is such a good idea.
| [reply] |
|
| [reply] |
|
The first century AD was century zero.
I thought the first century A.D. was century 1, the first year of which was year 1 A.D. (with the year before being 1 B.C.), the concept of "zero" not percolating into European thought until some non-zero number of centuries later. Which is why, twenty centuries later, we are stuck with 2001 being the first year of the twenty-first century.
| [reply] |
|
|
|
| [reply] |
|
On your first birthday, did you turn one or two? :D
| [reply] |
A reply falls below the community's threshold of quality. You may see it by logging in. |