|
Boost : |
From: John Max Skaller (skaller_at_[hidden])
Date: 2001-06-19 17:36:39
Peter Dimov wrote:
>
> From: <jaakko.jarvi_at_[hidden]>
>
> > > - Should indexing from 0 to n-1 be supported? Isn't 0-based indexing
> > > more intuitive in C++?
>
> > This is a matter of taste. Others?
>
> Zero-based indexing is usually more intuitive, however, when tuple is used
> as a building block for a bind/lambda library, the arguments are one-based.
>
> FWIW, I made the same decision (one-based "tuples") in bind.hpp (in the
> vault.)
I used 1 indexing in Felix, but just changed it to 0 based.
A tuple of elements of the same type is an array.
The convention in mathematics is 1 origin, in C it is 0 origin.
I personally prefer 1 origin, but I also dislike inconsistencies.
:-)
-- John (Max) Skaller, mailto:skaller_at_[hidden] 10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850 checkout Vyper http://Vyper.sourceforge.net download Interscript http://Interscript.sourceforge.net
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk