Boost logo

Boost :

From: joel de guzman (isis-tech_at_[hidden])
Date: 2001-06-28 09:53:01


----- Original Message -----
From: "Ed Brey"

> Real-world indexing convention is moot, however, since tuple indexing
> will be used side-by-side with arrays, vectors, indexable maps, pointer
> offset, etc. in C++. Compatibility with the rest of C++ is paramount,
> since only very occasionally will the programmer be looking at a row of
> elevator buttons while typing. As others have alluded to, as the power
> of the tuple and lambda libraries grows, they will find increasingly
> closer use with existing containers that use 0-based indexing. It would
> be a recipe for confusion, and an invitation for future users to curse
> the legacy decisions of old (made today), to have non-aligned indexing.
>
> Compatibility between the tuple and lambda libraries is important. The
> outcome of this discussion should apply to both libraries.
>

I agree 100%. The 0th index refers to the *1st* element just like
in C, just as in C++.

Also, since we are dealing with static constants, we can do something
like const int _1st = 0, const int _2nd = 1 etc. for those who prefer to
think
in terms of elements vs. indexes.

-Joel de Guzman


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk