Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: R: Re: Correct Behaviour? Was False = 2 ????

From: robbo1mark:aol at: 4-Jul-2001 8:33

To paraphrase what Ken Antony expressed so eloquently yesterday.. Counting is NOT the same as indexing! the series of natural numbers 0 1 2 3 4 5 ....... infinity which is the first number? 0 or 1 ? YES I too think REBOL is BETTER! but I don't agree that it should / necessarily has to be different in this respect. I previously swayed on this issue but the example
>> a: [ a b c d]
== [a b c d]
>> index? a
== 1
>> a: next a
== [b c d]
>> pick a 1
== b
>> index? a
== 2
>> pick a -1
== a this swayed it for me! IMHO series should be traversed backwards & forwards from the current index point which to me logically is index position ZERO. That's all. Mark Dickson In a message dated Wed, 4 Jul 2001 7:32:54 AM Eastern Daylight Time, "Alekk" <[alekk--obywatel--pl]> writes: << ----- Original Message ----- From: <[Robbo1Mark--aol--com]> To: <[rebol-list--rebol--com]> Sent: Wednesday, July 04, 2001 10:20 AM Subject: [REBOL] Re: R: Re: Correct Behaviour? Was False = 2 ???? [...]
> I looked at Visual Basic, Pascal, Modula-2, C, C++, C#, Java, Javascript,
Perl, Python, Fortran amongst others and they ALL use zero based indexing. [...] So what? REBOL is different ;) IMO REBOL is designed with people in mind. When You say "all other languages..." it is like "millions of flies can't be wrong. Let's eat ...". 1. First, second ... - increases readability. With zero at start - it would be strange. 2. Length and last index is the same number - no need for another function. 3. Publicity - "Ah, THAT is the language which use ONE based indexing". 4. You can always write Your own dialect. Aleksander K. [alekk--obywatel--pl]