Click here to Skip to main content
15,910,981 members

Survey Results

Should array indexing start at 0 or 1?   [Edit]

Survey period: 7 Mar 2011 to 14 Mar 2011

Old school VB devs and old school C devs know the answer. What's your feeling in this modern, enlightened era?

OptionVotes% 
01,11587.93
115312.07



 
GeneralI understand zero is better for computers... Pin
JChrisCompton14-Mar-11 11:35
JChrisCompton14-Mar-11 11:35 
GeneralRe: I understand zero is better for computers... Pin
Klaus-Werner Konrad6-Jun-11 14:02
Klaus-Werner Konrad6-Jun-11 14:02 
GeneralRe: I understand zero is better for computers... Pin
JChrisCompton7-Jun-11 11:54
JChrisCompton7-Jun-11 11:54 
GeneralTrivial Point with Option Base Pin
CaWxMan14-Mar-11 9:50
CaWxMan14-Mar-11 9:50 
GeneralRe: Trivial Point with Option Base Pin
Klaus-Werner Konrad14-Mar-11 10:46
Klaus-Werner Konrad14-Mar-11 10:46 
GeneralRe: Trivial Point with Option Base Pin
Colin Mullikin6-Jun-11 10:56
professionalColin Mullikin6-Jun-11 10:56 
GeneralRe: Trivial Point with Option Base Pin
Klaus-Werner Konrad6-Jun-11 13:52
Klaus-Werner Konrad6-Jun-11 13:52 
GeneralRe: Trivial Point with Option Base Pin
Colin Mullikin7-Jun-11 4:03
professionalColin Mullikin7-Jun-11 4:03 
GeneralRe: Trivial Point with Option Base Pin
yakshasa15-Mar-11 5:19
yakshasa15-Mar-11 5:19 
GeneralWell... Pin
Lutosław12-Mar-11 1:15
Lutosław12-Mar-11 1:15 
JokeIt should start from sqrt(-1) in a high-level programming language. PinPopular
S. Fischer11-Mar-11 2:03
S. Fischer11-Mar-11 2:03 
GeneralRe: It should start from sqrt(-1) in a high-level programming language. Pin
Emilio Garavaglia13-Mar-11 21:26
Emilio Garavaglia13-Mar-11 21:26 
GeneralThe real answer is 42 PinPopular
Yusuf10-Mar-11 17:29
Yusuf10-Mar-11 17:29 
GeneralRe: The real answer is 42 Pin
Toniyo Jackson10-Mar-11 23:57
Toniyo Jackson10-Mar-11 23:57 
GeneralRe: The real answer is 42 Pin
Ed Nutting11-Mar-11 8:31
Ed Nutting11-Mar-11 8:31 
GeneralRe: The real answer is 42 Pin
567890123411-Mar-11 2:48
567890123411-Mar-11 2:48 
GeneralNot just in computing PinPopular
Kamran Behzad10-Mar-11 17:01
Kamran Behzad10-Mar-11 17:01 
GeneralRe: Not just in computing Pin
xawari11-Mar-11 9:57
xawari11-Mar-11 9:57 
GeneralRe: Not just in computing Pin
Emilio Garavaglia13-Mar-11 21:23
Emilio Garavaglia13-Mar-11 21:23 
AnswerRe: Not just in computing Pin
JChrisCompton14-Mar-11 11:50
JChrisCompton14-Mar-11 11:50 
GeneralBe practical - do what comes naturally Pin
Kamran Behzad10-Mar-11 12:12
Kamran Behzad10-Mar-11 12:12 
GeneralRe: Be practical - do what comes naturally Pin
Jay Gatsby11-Mar-11 22:56
Jay Gatsby11-Mar-11 22:56 
That seems to me like a troubling coding practice.

Consider that if your array is an array of extremely large structures, say of 500 megabytes each, then it can hardly be said that you are losing only one byte (that entire space will be allocated for one such structure, complete with all of it's fields set to their defaults). Yes, I voted zero, and I am not in the habit of wasting 500 megs, or any other sizable chunk of memory, just for the sake of my code being a little more "human-readable"--whatever that's supposed to mean these days. To that end I cringe at the thought of wasting even just one byte, but maybe that's because I had an inspirational C teacher who wanted me to know whether ++i or i++ was faster by a matter of picoseconds, with gcc optimizations turned off, or how to beat quicksort when given numerous details about the distribution and type of data to be sorted (perhaps a non-comparison sort? linear time, anyone?). On the matter of forsaking the entire 0th element in an array for no reason other than "taste," I politely refuse--so fire me.
-Gatsby

GeneralRe: Be practical - do what comes naturally Pin
PJ Arends12-Mar-11 6:14
professionalPJ Arends12-Mar-11 6:14 
GeneralRe: Be practical - do what comes naturally Pin
Jay Gatsby14-Mar-11 15:13
Jay Gatsby14-Mar-11 15:13 
GeneralRe: Be practical - do what comes naturally Pin
Mr Nukealizer13-Mar-11 12:54
Mr Nukealizer13-Mar-11 12:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.