From: Thomas Wenisch (twenisch_at_[hidden])
Date: 2003-10-29 03:51:03
On Wed, 29 Oct 2003, Pavol Droba wrote:
> On Wed, Oct 29, 2003 at 12:09:23AM -0000, Andy Little wrote:
> > "Ross MacGregor" <ross__macgregor_at_[hidden]> wrote in message
> > news:bnmmlm$vsd$1_at_sea.gmane.org...
> > >
> > > Rob Stewart wrote:
> > >
> > > 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() ...?
> If just a name is confusing, I have no problem to rename it. However the problem
> would be to find the better name. I don't like find_offset. It does not
> decsribe what it is suppose to do.
How about find_occurrence(). It means the right thing, and doesn't
suggest 1 as the starting index as find_nth() does for some. The big
disadvantage is that it is tough to spell (two c's and two r's).
Some other possibilities:
Computer Architecture Lab
Carnegie Mellon University
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk