
----- Original Message ----- From: "Giovanni Piero Deretta" <gpderetta@gmail.com> To: <boost@lists.boost.org> Sent: Wednesday, February 25, 2009 7:06 PM Subject: Re: [boost] Formal Review: Boost.RangeEx
On Wed, Feb 25, 2009 at 6:46 PM, Thorsten Ottosen <thorsten.ottosen@dezide.com> wrote:
Neil Groves skrev:
I simply dislike lots of overloading particularly where the semantics are different. Perhaps the semantics aren't that different.
There are very different. The past tense is used for adaptors that has O(1) complexity and merely wraps the range's iterators in a new type of iterators.
An algorithm like
boost::unique(-)
really modifies the range, | boost::adaptors::uniqued, does not.
Completely agree, unque (as in std::unique) and uniqued are two different functions and should be named differently. On the other hand uniqued and make_uniqued_range are the same thing and should have the same name. I just don't like either 'uniqued' or 'make_uniqued_range'.
I think that the correct name for 'uniqued' should be 'unique' and the name for the std derived 'unique' should be 'unique_inplace', but I guess this would confuse people.
As unique exist already, what about unique_view. With the _view suffix we state clearly that the evaluation is lazy. Vicente