Click here to Skip to main content
15,900,816 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



 
GeneralRe: It should be a choiche, in high level programming languages Pin
Emilio Garavaglia7-Mar-11 4:03
Emilio Garavaglia7-Mar-11 4:03 
GeneralRe: It should be a choiche, in high level programming languages Pin
Rob Grainger7-Mar-11 22:10
Rob Grainger7-Mar-11 22:10 
GeneralRe: It should be a choiche, in high level programming languages Pin
Emilio Garavaglia8-Mar-11 4:33
Emilio Garavaglia8-Mar-11 4:33 
GeneralRe: It should be a choiche, in high level programming languages Pin
Klaus-Werner Konrad13-Mar-11 2:41
Klaus-Werner Konrad13-Mar-11 2:41 
GeneralRe: It should be a choiche, in high level programming languages Pin
Emilio Garavaglia13-Mar-11 8:14
Emilio Garavaglia13-Mar-11 8:14 
GeneralRe: It should be a choiche, in high level programming languages Pin
Klaus-Werner Konrad13-Mar-11 10:04
Klaus-Werner Konrad13-Mar-11 10:04 
GeneralRe: It should be a choiche, in high level programming languages Pin
Emilio Garavaglia13-Mar-11 21:05
Emilio Garavaglia13-Mar-11 21:05 
GeneralRe: It should be a choiche, in high level programming languages Pin
Klaus-Werner Konrad14-Mar-11 11:15
Klaus-Werner Konrad14-Mar-11 11:15 
Ok -you're right !
I'm just another 'old-fashioned' programmer, who start ist's life with BASIC (Sharp PC1211), learned PL/1 and FORTRAN at university, followed by FORTH at Sharp PC 1512, proceeded to ASM Z80 while adapting my own built Z80 computer system to CP/M, then switched to C.
But in those old days memory was a real issue - a Z80 can only access 64 KB of memory, and this with memory mapped display space ...
Today memory isn't a real issue anymore, and processing speed doesn't (really) matter, too - my original Z80-system was by far the fastest system possible, built purely with 8 MHz-parts (1983). This was by far more than the original IBM PC speed (not to mention the ability of vectored interrupts etc.)
So, today, we as developers, should say 'don't bother' to performance issues ????

Just an example:

i < count in pseudo-assempler means i-count; if (sign_flag==-1) THEN ...

i a<= count means i-count; if (sign_flag==-1 OR zero_flag==TRUE) THEN ...

As you can see, the latter is less optimal, even if we talk about nanoseconds, but in summarize it can be a real difference in performance.

And: I Like PURE C - *I* can allocate memory, when I need it, and *I* decide, when to release it !!!
Of course, one have to be very careful about it, but - correct used - it gave you the most control, and the most power !


Another question is: WHO needs more 'abstraction level' ?
If I have a well done codebase fore the basic tasks (i.e. wrappers to WIN API and other basics) then I can do my buisiness layer even in pure C (or C++) as well ...
General...except when... PinPopular
OriginalGriff6-Mar-11 20:59
mveOriginalGriff6-Mar-11 20:59 
GeneralRe: ...except when... Pin
Johnny J.6-Mar-11 21:40
professionalJohnny J.6-Mar-11 21:40 
GeneralRe: ...except when... PinPopular
OriginalGriff6-Mar-11 21:42
mveOriginalGriff6-Mar-11 21:42 
GeneralRe: ...except when... Pin
Nagy Vilmos7-Mar-11 6:55
professionalNagy Vilmos7-Mar-11 6:55 
GeneralRe: ...except when... Pin
OriginalGriff7-Mar-11 8:27
mveOriginalGriff7-Mar-11 8:27 
GeneralIt should start from 0 in a high-level programming language. PinPopular
OriginalGriff6-Mar-11 20:58
mveOriginalGriff6-Mar-11 20:58 
GeneralRe: It should start from 0 in a high-level programming language. Pin
Johnny J.6-Mar-11 21:39
professionalJohnny J.6-Mar-11 21:39 
GeneralRe: It should start from 0 in a high-level programming language. Pin
OriginalGriff6-Mar-11 22:04
mveOriginalGriff6-Mar-11 22:04 
GeneralMessage Removed Pin
7-Mar-11 4:34
professionalN_tro_P7-Mar-11 4:34 
GeneralRe: It should start from 0 in a high-level programming language. [modified] Pin
Indivara6-Mar-11 22:07
professionalIndivara6-Mar-11 22:07 
GeneralRe: It should start from 0 in a high-level programming language. Pin
hairy_hats7-Mar-11 0:21
hairy_hats7-Mar-11 0:21 
GeneralRe: It should start from 0 in a high-level programming language. Pin
Indivara7-Mar-11 3:46
professionalIndivara7-Mar-11 3:46 
GeneralRe: It should start from 0 in a high-level programming language. Pin
Pritesh Aryan7-Mar-11 18:09
Pritesh Aryan7-Mar-11 18:09 
GeneralRe: It should start from 0 in a high-level programming language. Pin
Indivara8-Mar-11 3:05
professionalIndivara8-Mar-11 3:05 
GeneralRe: It should start from 0 in a high-level programming language. Pin
Bassam Abdul-Baki7-Mar-11 1:13
professionalBassam Abdul-Baki7-Mar-11 1:13 
GeneralMessage Removed Pin
7-Mar-11 4:36
professionalN_tro_P7-Mar-11 4:36 
GeneralRe: It should start from 0 in a high-level programming language. Pin
Bassam Abdul-Baki7-Mar-11 10:55
professionalBassam Abdul-Baki7-Mar-11 10:55 

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.