"Software Development using the C++ Boost Library", book in preparatiion

Looks great to me. A few comments: ---------- Forwarded message ---------- From: "Daniel J. Duffy" <ddu...@datasim.nl> Date: Feb 15, 12:55 am Subject: "Software Development using the C++ Boost Library", book in preparatiion To: Boost Developers Archive
1. Higher Order Functions I used to use boost::function a lot, but now find myself using templated classes with deduction of the function type instead and haven't used boost::function for a long time . I think when writing this section, it would be nice to have a good sense of when type erasure using boost::function is necessary.
I found that the main reason I was using boost::function was not type erasure but rather that the types of the functions I was storing were complicated so it was easier to stuff in a boost::function and then have an easier way to reference the type. After I started using auto, decltype, and make_ functions, this became unnecessary. Of course, you can't count on people having "declype" or "auto", so my proposal would be to see if BOOST_AUTO, etc. should be suggested as a temporary solution for people without C++0X turned on. One other thing worth thinking about here is whether you should plan for standardizing on the tr1 namespace(and explain how to use boost::tr1). This might future proof the book as most mainstream compilers seem to have tr1 already. That said, I had a lot of problem with the tr1 library that comes with the Microsoft compiler mixing boost functional programming libraries and tr1::function/bind, so you might want to try things out before going down this route.
6. Utilities and other Libraries
I would love to see a short section on Fusion. I have found Fusion very useful and a good alternative to using type erasure for my applications. Of course, the numerical computing I do has almost everything known at compile time which may distort my view. Also consider type_traits and enable_if, and a minimalist use of MPL to support managing overloads (mpl::and, not, if, etc.). (a huge part of the superb C++ Template Metaprogramming book is about advanced features like iterators or your own sequences, which isn't necessary for most users)

Thanks again for all the feedback. Here are some responses: 1. Phoenix: I'm sold :-) This will be a great library for applications. The chapter we had for Lambda is now for Phoenix. Nice that it can be used as a separate module. Maybe it should be a 1st-class library in its own right? 2. type erasure: I looked this term up but it seems as if it is similar to interface/device independent/ programming. In the past we built homemade Function and used it in combination with OO specialisation with virtual functions, Now boost Function is so much better. Mathematicians and engineers are used to functions and we adopt the same approach (e.g. using namespaces) 3. Ideally, we would like TR1 and boost to be as seamless as possible. 4. Fusion: I think this is useful, especially with Any? 5. Geometry: In a past life I worked in CAD, so I like it, although this could be a book in itself. An overview and a number of appropriate examples is something we could discuss. Many developers want to have a simple program to display their results. A visualiser for multi_array would be great :-) 6. "Boost Library"; there are many libraries in the collection, What is the best description: "Boost", "Boost Suite" when referring to everything? 7. Numerical integration: I saw this extensive library in Vault. What is the status? regards Daniel ________________________________ From: boost-bounces@lists.boost.org on behalf of Jesse Perla Sent: Tue 16-02-2010 15:46 To: boost@lists.boost.org Subject: [boost] "Software Development using the C++ Boost Library",book in preparatiion Looks great to me. A few comments: ---------- Forwarded message ---------- From: "Daniel J. Duffy" <ddu...@datasim.nl> Date: Feb 15, 12:55 am Subject: "Software Development using the C++ Boost Library", book in preparatiion To: Boost Developers Archive
1. Higher Order Functions I used to use boost::function a lot, but now find myself using templated classes with deduction of the function type instead and haven't used boost::function for a long time . I think when writing this section, it would be nice to have a good sense of when type erasure using boost::function is necessary.
I found that the main reason I was using boost::function was not type erasure but rather that the types of the functions I was storing were complicated so it was easier to stuff in a boost::function and then have an easier way to reference the type. After I started using auto, decltype, and make_ functions, this became unnecessary. Of course, you can't count on people having "declype" or "auto", so my proposal would be to see if BOOST_AUTO, etc. should be suggested as a temporary solution for people without C++0X turned on. One other thing worth thinking about here is whether you should plan for standardizing on the tr1 namespace(and explain how to use boost::tr1). This might future proof the book as most mainstream compilers seem to have tr1 already. That said, I had a lot of problem with the tr1 library that comes with the Microsoft compiler mixing boost functional programming libraries and tr1::function/bind, so you might want to try things out before going down this route.
6. Utilities and other Libraries
I would love to see a short section on Fusion. I have found Fusion very useful and a good alternative to using type erasure for my applications. Of course, the numerical computing I do has almost everything known at compile time which may distort my view. Also consider type_traits and enable_if, and a minimalist use of MPL to support managing overloads (mpl::and, not, if, etc.). (a huge part of the superb C++ Template Metaprogramming book is about advanced features like iterators or your own sequences, which isn't necessary for most users) _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Daniel J. Duffy wrote: This thread is disturbing; read on.
1. Phoenix: I'm sold :-) This will be a great library for applications. The chapter we had for Lambda is now for Phoenix. Nice that it can be used as a separate module. Maybe it should be a 1st-class library in its own right?
I believe Joel already said it would be in v3.
2. type erasure: I looked this term up but it seems as if it is similar to interface/device independent/ programming. In the past we built homemade Function and used it in combination with OO specialisation with virtual functions, Now boost Function is so much better. Mathematicians and engineers are used to functions and we adopt the same approach (e.g. using namespaces)
It seems troublesome that you would assert authority to write about a wide array of the more advanced Boost libraries without knowing the meaning of "type erasure."
3. Ideally, we would like TR1 and boost to be as seamless as possible.
That's rather vague.
4. Fusion: I think this is useful, especially with Any?
I realize that you just learned of this library, so you can't speak from firsthand or specific knowledge, but that, itself, is disturbing based upon the original message in this thread in which you stated that the book is "in preparation," that it "is pitched" to certain skill levels, etc., which suggested you had already written much of the book. At this point, one easily can conclude that you have only conceived the book idea, possibly even pitched it to a publisher, and now want to know what to put in it, all while having only a cursory knowledge of Boost.
6. "Boost Library"; there are many libraries in the collection, What is the best description: "Boost", "Boost Suite" when referring to everything?
You claim some subject matter authority, given that you intend to write a book on numerous libraries from Boost, and yet you apparently don't know enough about the community to find the home page. The logo in the upper left corner uses the phrase "Boost C++ Libraries," and the first sentence states that, "Boost provides free peer-reviewed portable C++ source libraries." Later sentences use the phrase "Boost libraries." The home page should give you what you need to know how to refer to Boost and its libraries. That you didn't investigate that far is disturbing. There are a number of books that mention Boost, including _Beyond the C++ Standard Library: An Introduction to Boost_, by Bjorn Karlsson, which should have demonstrated how to reference the libraries. Have you read the extant books on or related to Boost? There have even been discussions in this mailing list on that subject. Did you search for them? I'm not against the idea of your book or of your writing it, but it seems as though you are asking us to critique the initial outline, suggest what you should write about, provide examples, etc., all before you've done the research needed to know the Boost libraries and community. _____ Rob Stewart robert.stewart@sig.com Software Engineer, Core Software using std::disclaimer; Susquehanna International Group, LLP http://www.sig.com IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.

Hi Robert Stewart, Thanks for your comments. Some feedback and background to this project: . "type erasure" is well-known in several other different contexts, under different names. My point was that Function (which I have applied to financial 3D PDE problems with multi-array) is a good way to solve these problems (using design patterns). In fact, 'Type Erasure" does not seem to be a widely used term; I could not find it in Alexandrescu, Josuttis... Of course, google. . My remark 3 was a response to Jesse Perla's comments. The idea is that you don't want vendor stuff being mixed up with boost. That should be clear. . Fusion; I did not say I knew it, again it was a response and a queston to Jesse. . The status of the book (now that you ask); I am publishing it myself by my own company (I mention this in my first post!) , have used boost for some years (several courses, see my site www.datasimfinancial.com as wel as boost thread with examples) and am porting code to it. At this moment we have about 12 chapters ready and have already integrated some libaries into production code. "In preparation" thus means: we are writing it up. I have done the feasibility leg-work. I reckon the book will be ready by Summer 2010. We have a number of reviewers since a while. Look at my original list of chapters again, most chapters are well under way. For the record, I have written 8 books, so I knew how the process works. I hope these remarks clear things up for you. It goes without saying that I can gladly send my chapters to the respective authors when completed. Btw I am familiar with books by Karlsson, and on BGL, MPL. And boost.org. Referencing the libraries: is it not allowed to ask just to make sure that I am using the correct terminology? regards and thanks Daniel ________________________________ From: boost-bounces@lists.boost.org on behalf of Stewart, Robert Sent: Wed 17-02-2010 13:04 To: boost@lists.boost.org Subject: Re: [boost] "Software Development using the C++ Boost Library",book in preparatiion Daniel J. Duffy wrote: This thread is disturbing; read on.
1. Phoenix: I'm sold :-) This will be a great library for applications. The chapter we had for Lambda is now for Phoenix. Nice that it can be used as a separate module. Maybe it should be a 1st-class library in its own right?
I believe Joel already said it would be in v3.
2. type erasure: I looked this term up but it seems as if it is similar to interface/device independent/ programming. In the past we built homemade Function and used it in combination with OO specialisation with virtual functions, Now boost Function is so much better. Mathematicians and engineers are used to functions and we adopt the same approach (e.g. using namespaces)
It seems troublesome that you would assert authority to write about a wide array of the more advanced Boost libraries without knowing the meaning of "type erasure."
3. Ideally, we would like TR1 and boost to be as seamless as possible.
That's rather vague.
4. Fusion: I think this is useful, especially with Any?
I realize that you just learned of this library, so you can't speak from firsthand or specific knowledge, but that, itself, is disturbing based upon the original message in this thread in which you stated that the book is "in preparation," that it "is pitched" to certain skill levels, etc., which suggested you had already written much of the book. At this point, one easily can conclude that you have only conceived the book idea, possibly even pitched it to a publisher, and now want to know what to put in it, all while having only a cursory knowledge of Boost.
6. "Boost Library"; there are many libraries in the collection, What is the best description: "Boost", "Boost Suite" when referring to everything?
You claim some subject matter authority, given that you intend to write a book on numerous libraries from Boost, and yet you apparently don't know enough about the community to find the home page. The logo in the upper left corner uses the phrase "Boost C++ Libraries," and the first sentence states that, "Boost provides free peer-reviewed portable C++ source libraries." Later sentences use the phrase "Boost libraries." The home page should give you what you need to know how to refer to Boost and its libraries. That you didn't investigate that far is disturbing. There are a number of books that mention Boost, including _Beyond the C++ Standard Library: An Introduction to Boost_, by Bjorn Karlsson, which should have demonstrated how to reference the libraries. Have you read the extant books on or related to Boost? There have even been discussions in this mailing list on that subject. Did you search for them? I'm not against the idea of your book or of your writing it, but it seems as though you are asking us to critique the initial outline, suggest what you should write about, provide examples, etc., all before you've done the research needed to know the Boost libraries and community. _____ Rob Stewart robert.stewart@sig.com Software Engineer, Core Software using std::disclaimer; Susquehanna International Group, LLP http://www.sig.com <http://www.sig.com/> IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Daniel J. Duffy wrote: Please stop top posting: http://www.boost.org/community/policy.html#quoting.
Some feedback and background to this project:
. "type erasure" is well-known in several other different contexts, under different names. My point was that Function (which I have applied to financial 3D PDE problems with multi-array) is a good way to solve these problems (using design patterns).
Well, I'm apparently displaying my ignorance, because I didn't know of it by any other names.
In fact, 'Type Erasure" does not seem to be a widely used term; I could not find it in Alexandrescu, Josuttis... Of course, google.
The second printing of _C++ Template Metaprogramming_, by Abrahams and Gurtovoy, was printed in December 2004 and it defines and discussions type erasure in ยง9.7. Wikipedia defines the term more generally and references an article from 2002. It may be that Dave extended the meaning to cover what was done in MPL, but he's a better one to address that. I see type erasure in Boost.Signals documentation going back to 2003. My point is that the term has been in use, particularly within the Boost community, for a long time.
. My remark 3 was a response to Jesse Perla's comments. The idea is that you don't want vendor stuff being mixed up with boost. That should be clear.
TR1 isn't "vendor stuff," so your comment still isn't clear. Not mixing vendor specific extensions with standard C++ is certainly laudable.
. Fusion; I did not say I knew it, again it was a response and a queston to Jesse.
I acknowledged that in my comment. My point was that you quickly decided to include Fusion in the book, along with other libraries that you obviously don't know about, which suggests that the information you provide on the library will not be from extensive, real world experience, making its inclusion suspect. You may manage to do a fine job on Fusion, particularly if you get input from experts, but that doesn't mean there isn't room to be suspicious.
. The status of the book (now that you ask); I am publishing it myself by my own company (I mention this in my first post!) ,
Your first post happens to include an e-mail address at datasim.nl and indicates that the publisher is Datasim Press, Ltd. However, there is no mention that it is your company or that you even work there (the e-mail address could have been assigned to you for the purpose of the book). Nevertheless, the link wasn't clear and I did gloss over those details. Thank you for clarifying it.
have used boost for some years (several courses, see my site www.datasimfinancial.com as wel as boost thread with examples) and am porting code to it. At this moment we have about 12 chapters ready and have already integrated some libaries into production code. "In preparation" thus means:
I'm pleased to hear there currently is much more to the book than I inferred.
we are writing it up. I have done the feasibility leg-work. I reckon the book will be ready by Summer 2010. We have a
That seems aggressive given the time necessary to learn entirely new and significant libraries like Fusion, Phoenix, and Geometry, never mind writing the content and examples and getting reviewer feedback.
number of reviewers since a while. Look at my original list of chapters again, most chapters are well under way. For the record, I have written 8 books, so I knew how the process works. I hope these remarks clear things up for you.
I'm sorry I came off so negative, but the rapidity with which you adopted new libraries to cover, along with other aspects of the original post and your responses in this thread, gave me to think of your post as a "help me with my homework assignment" request.
Referencing the libraries: is it not allowed to ask just to make sure that I am using the correct terminology?
It is certainly reasonable, yet you made a fundamental error that the sources I mentioned should have made plain by referring to "the Boost library." Had your question been, "Is it correct to refer to Boost by just 'Boost' and to the libraries as either 'Boost C++ Libraries' or 'Boost libraries'?", and had the question as posed not been among the other concerns I raised, there would have been no problem. I hope your book lives up to its promise. _____ Rob Stewart robert.stewart@sig.com Software Engineer, Core Software using std::disclaimer; Susquehanna International Group, LLP http://www.sig.com IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.
participants (3)
-
Daniel J. Duffy
-
Jesse Perla
-
Stewart, Robert