
On Wed, Feb 25, 2009 at 6:46 PM, Thorsten Ottosen <thorsten.ottosen@dezide.com> wrote:
Neil Groves skrev:
Dear Giovanni,
I do provide both alternatives, for example
boost::make_uniqued_range(rng) is equivalent to rng | uniqued
IMHO the make_... syntax for range adaptors is horrible (i don't even like the past tense, why not just unique?). But why use two different names in the first place? Why not make
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. -- gpd