|
Boost : |
From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2003-11-02 00:52:57
"David Abrahams" <dave_at_[hidden]> wrote in message
news:uad7fr57n.fsf_at_boost-consulting.com...
> Pavol Droba <droba_at_[hidden]> writes:
>
> > On Sat, Nov 01, 2003 at 10:03:36AM -1000, David Abrahams wrote:
> >> Pavol Droba <droba_at_[hidden]> writes:
> >
> > [snip]
> >
> >> I think it should be moved outside and documented as a separate
> >> utility. It's valuable to be able to pass containers around. It
> >> would be good if you'd look over the functionality of half_open_range
> >> and see if there's anything worth stealing.
> >>
> > Ok this seems reasonable. There is one more thing left open: the name.
> >
> > Is "iterator_range" ok, or should it be renamed to "range"?
yes.
> > There is a set of support utilities, which has currently names like
> > make_range, copy_range and etc.
> > Either these functions are renamed to make_iterator_range (and etc.),
> > or the class will have to be renamed to "range".
> >
> > My question to public is: What is prefered solution?
>
> It should only be called "range" if it's meant to work on ranges of
> non-iterators.
don't the interval class cover that part?
>But then, you should call it half_open_range ;-)
I think range is perfectly fine; short and elegant; no matter what of the
proposed names that are chosen, an exact definition is required...the name
itself will never tell the whole store. Eg. half_open_range don't tell me
which end is open and which is closed. And for iterator_range, it's kind of
double information when you write
iterator_range< some_iterator >
instead of
range< some_iterator >.
-Thorsten
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk