Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-01-21 13:43:16


----- Original Message -----
From: "vesa_karvonen" <vesa_karvonen_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Monday, January 21, 2002 1:22 PM
Subject: [boost] Re: Comments on the preprocessor list data structure

> --- In boost_at_y..., Douglas Gregor <gregod_at_c...> wrote:
> > On Monday 21 January 2002 06:53 am, you wrote:
> > > file://! Drops the first N elements of the list.
> [...]
> > > #define BOOST_PP_LIST_DROP(N,L)
>
> > "Drop" doesn't really tell us anything about what's being dropped.
> How about
> > using REMOVE_FIRST instead, e.g.,
> >
> > BOOST_PP_REMOVE_FIRST(2,BOOST_PP_TUPLE_TO_LIST(4,(+,-,*,/)))
> >
> > Or, perhaps, to save typing, use REMOVE1ST.
>
> The name "drop" is used for the same function in Haskell (and in
> several other more or less functional languages). I agree that it may
> sound a bit odd at first. The functions "drop" and "take" form a
> logical couple.
>
> What do you think about the name "take"?
>
> 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.

FWIW, when I read the message I kept thinking "car" and "cdr".

-Dave


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