Boost logo

Boost :

From: Ed Brey (brey_at_[hidden])
Date: 2000-09-15 08:18:55


Comments on documentation for range proposal:

The member names for range are not representative of their meanings.
Intuitively, if I had a range from [0,10), I would think that first
represents 0 and second represents 1. Begin and end would be better names.
I question whether there is enough benefit of inheriting from pair to make
the inappropriate names worthwhile. This would also bring range and
interval's interfaces closer together.

Off hand, the only overlapping use of pair I can think if is when working
with the result of equal_range. Hmmm, maybe just having a constructor that
accepts a pair, which you already have, would be good enough.

The meaning of is_normal_range is not defined. Earlier in the paragraph you
define a proper range. Is_proper_range would be a better name. Also,
is_single_range is not defined. Before I looked at the code, I guessed that
is_single_range checked whether (first + 1 == second). Perhaps
is_empty_range or is_null_range would be better, although there may be an
existing math term that is even better. (If "single" is just that term, then
I guess I missed it back in school. :-) )

The documentation should make clear that "end" means one-past-the-end.

Check spelling on convenient/convenience.


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