Boost logo

Boost :

Subject: Re: [boost] Formal Review: Boost.RangeEx
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2009-02-25 13:55:01


----- Original Message -----
From: "Giovanni Piero Deretta" <gpderetta_at_[hidden]>
To: <boost_at_[hidden]>
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_at_[hidden]> 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


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