Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-01-21 15:11:02

----- Original Message -----
From: "Douglas Gregor" <gregod_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Monday, January 21, 2002 3:01 PM
Subject: Re: [boost] Re: Comments on the preprocessor list data structure

> On Monday 21 January 2002 01:22 pm, you wrote:
> > What do you think about the name "take"?
> It doesn't give as much information as, say, "get_first" would (IMHO). Or
> even something like "front_N" would make more sense to me.

> > I think that 'remove_first' certainly sounds more like STL,
> > but "drop" and "take" don't seem to have close enough relatives in
> > STL, so that the names could just be borrowed.

I was looking for this function in elisp recently. It appears they use the
unfortunate name, "butfirst" <snicker>.

> I think that's my goal - to sound more like STL. Here's why:
> Effective use of the STL requires a large vocabulary already, and we can
> reasonably expect a competent C++ programmer to know what most of the STL
> algorithms do, roughly. By naming the Preprocessor library's routines
> STL routines, we immediately capitalize on that knowledge. Then code that
> uses the Preprocessor library looks a little like code that uses the STL,
> it requires less programmer effort to understand.

I agree. I hope we'll review and accept the MPL soon, and that's also one of
its strengths, for C++ programmers.

That said, "accumulate" is an unfortunate name choice, since it is so much
more versatile than that - it's not even neccessarily a numeric operation.
"Reduce", "fold", or the others would have been better names. I wouldn't be
opposed to providing two names in this particular case.


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