Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-11-02 03:03:14


"Thorsten Ottosen" <nesotto_at_[hidden]> writes:

>> 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?

No; that's an almost entirely different beast.

>>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.

AFAIK, there's little use for the mirror image half-open range. OTOH,
open and closed ranges come up all the time in numerics.

> And for iterator_range, it's kind of double information when you
> write
>
> iterator_range< some_iterator >
>
> instead of
>
> range< some_iterator >.

IMO "range" is too short and general a name to be reserved in boost
for half-open-range-of-iterators.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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