Boost logo

Boost :

From: brangdon_at_[hidden]
Date: 2001-12-03 18:01:12

In-Reply-To: <E16At77-0004r9-00_at_[hidden]>
On Mon, 3 Dec 2001 16:26:28 +0300 Vladimir Prus (ghost_at_[hidden]) wrote:
> This is embarassing/inelegant. Consider writing
> container_algorithms::sort(.....), and repeating that prefix in
> everywhere....

Using a shorter name would help. Eg:

Or more likely:

But here the "boost::" part is the bulk of it.

I don't see what else we can do. The std algorithms have such general
signatures. I don't think seq_sort() (or similar) is an improvement. I
don't like to get terseness from abbreviation, but the name "std" is a

> > In my view, sequence objects should be mutable in much the same way
> > that iterators are mutable. They should not be passed by reference.
> > Then there is no problem with temporaries.
> In this case, directly passing vector to an algorithm is very
> inefficient.

Currently the std algorithms act on sequences, not containers, and I think
we should stick with that. We should just change how they are represented
without changing what they are. I tried to explain why in my messages to
Aleksey Gurtovoy (eg on the 5th Nov; if there's a reply I missed it). Your
objection applies to his ideas rather than mine. I hope it is still an
open issue.

This will mean even more verbosity, unfortunately:

    seq::sort( seq::make_seq(v) );

Dave Harris

Boost list run by bdawes at, gregod at, cpdaniel at, john at