|
Boost : |
From: Emily Winch (emily_at_[hidden])
Date: 2001-12-12 13:42:05
From: Peter Dimov <pdimov_at_[hidden]>
>From: "Dave Gomboc" <dave_at_[hidden]>
>> I also agree with the comments about naming regarding "IndexOf" should
>> be "at", and so forth. I imagine it will be a long, long time before I
>> stop thinking of "for_each" as anything other than "map" (from
>> Haskell/Miranda), but "for_each" is already the C++ term for it in the
>> STL, and that's not up for renaming. :-) Metaprogramming is still
>> programming!, and consistency is important, so call it for_each
>> everywhere, irregardless of whether it's happening at compile-time or
>> run-time.
>
>But for_each is not map, AFAIK. for_each can change the sequence it's
>applied to. Functional languages don't. Even transform is not map.
FWIW, I actually found for_each confusing, for this reason. Its similarity
to std::for_each made it more difficult for me to grasp, not less. for_each
for tuples makes sense. for_each for typelists doesn't.
Just my 2p.
Emily.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk