Boost logo

Boost :

From: Andy Little (andy_at_[hidden])
Date: 2003-10-28 19:09:23

"Ross MacGregor" <ross__macgregor_at_[hidden]> wrote in message
> Rob Stewart wrote:
> > From: David Abrahams <dave_at_[hidden]>
> >
> >>I don't get it. The first element of a sequence is s[0]. Why
> >>shouldn't the first matching substring be find_nth(s, XX, 0)?
> >
> > Because s[0] isn't the 0th element; it's the first. As I said,
> > we use ordinals to refer to things like this. Addressing an
> > element uses an index, and indexes start at zero. "nth"
> > explicitly refers to ordinals, and there's no 0th; you start with
> > 1st, so find_nth() should reasonably start numbering from one.
> Yes agree with Rob on this one. I have been using 0 based indexes for a
> long long time, but when i see find_nth(), I expect 1 to be the first
> occurence.
> I think in this case naming guidlines should override convention or
> usage concerns. If you use a term like "nth" in the name, it should
> reflect its usage in the english language.

"offset" does it for me... find_offset() ...?

Boost list run by bdawes at, gregod at, cpdaniel at, john at