Boost logo

Boost :

From: Eric Niebler (eric_at_[hidden])
Date: 2003-10-09 16:27:35


Brian McNamara wrote:

> accepting something like this opens the door to other
> container-facades, like
>
> BOOST_TRANSFORM( int_list, f )
> // means std::transform( int_list.begin(), int_list.end(), f )
>
> and it's unclear to me that this is a road I want to go down.
>
> So, I dunno. I'm mildly in favor of it, but I don't like the idea of
> it setting a precedent.

I don't think it would be setting a precedent. I see this as filling a
hole in the language. Other languages have foreach looping constructs,
and C++ is often criticised for the lack of one. Many new C++
programmers ask for foreach (See the "D vs. C++" and "anonymous blocks"
threads on c.l.c++.m, for example). Nobody asks for a "transform"
keyword -- it's not an important enough concept.

-- 
Eric Niebler
Boost Consulting
www.boost-consulting.com

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