ambs (22) [Avatar] Offline
#1
Probably your decision has some reason behing, but I was expecting listing 2.9 to be

std::vector<std::string> names = females | std::transform(name);


Again, not a C++ programmer (functional or not), but after reading that idiom in a previous example, I just wish I can use it everywhere.

Note: if you feel my 'no-typo-or-error' comments are not helping, let me know, and I won't make any.
Ivan Cukic (99) [Avatar] Offline
#2
That one is coming in a later chapter - chapter 7 "Ranges" to be exact. That syntax is gorgeous but it is not (yet) a part of C++ standard.

That is mainly the reason why it is not covered this early in the book. That, and the fact that I consider it important enough to deserve its own chapter (and it needs some pre-knowledge, so it ended up in ch 7).


> if you feel my 'no-typo-or-error' comments are not helping, let me know, and I won't make any.

I do find them useful, so keep them coming.

I'd even rank typo reports to be the least important since Manning people will look for those before the book goes to print. But even with that said, I do appreciate them as well - to quote Linus "given enough eyeballs, all bugs are shallow".
ambs (22) [Avatar] Offline
#3
Ivan Cukic wrote:That one is coming in a later chapter - chapter 7 "Ranges" to be exact. That syntax is gorgeous but it is not (yet) a part of C++ standard.

That is mainly the reason why it is not covered this early in the book. That, and the fact that I consider it important enough to deserve its own chapter (and it needs some pre-knowledge, so it ended up in ch 7).


As you introduce this in the first chapter... I got hungry for it smilie