Serving the Quantitative Finance Community

 
User avatar
quantmeh
Posts: 0
Joined: April 6th, 2007, 1:39 pm

Good C++ text

November 14th, 2008, 5:16 pm

QuoteOriginally posted by: ananihdvThere is only one STL book which follows this Generic Algorithm approach: did u mean generic programming? there's a bunch of books on STL and GP. including one from the vreator of STL, Stepanov
 
User avatar
Cuchulainn
Posts: 23029
Joined: July 16th, 2004, 7:38 am

Good C++ text

November 14th, 2008, 6:53 pm

QuoteOriginally posted by: jawabeanQuoteOriginally posted by: ananihdvThere is only one STL book which follows this Generic Algorithm approach: did u mean generic programming? there's a bunch of books on STL and GP. including one from the vreator of STL, StepanovIndeed.And not forgetting ths books by Josuttis. He is he most lucid in my opinion.I used Austern's book way back in the 90's. Has a new edition come out?
Last edited by Cuchulainn on November 13th, 2008, 11:00 pm, edited 1 time in total.
 
User avatar
ananihdv
Posts: 0
Joined: August 8th, 2006, 8:02 pm

Good C++ text

November 15th, 2008, 1:50 am

QuoteOriginally posted by: CuchulainnQuoteOriginally posted by: jawabeanQuoteOriginally posted by: anahttp://www.wilmott.com/messagepost.cfm?postact ... nihdvThere is only one STL book which follows this Generic Algorithm approach: did u mean generic programming? there's a bunch of books on STL and GP. including one from the vreator of STL, StepanovIndeed.And not forgetting ths books by Josuttis. He is he most lucid in my opinion.I used Austern's book way back in the 90's. Has a new edition come out?Josuttis is good, but it is about 1000 pages. Austern covers the same in 100 pages. Which one do you prefer? I don't think you used Austern's book. It was published only in Oct 99. The design of STL has not changed, so there was not need for a new edition.
 
User avatar
ananihdv
Posts: 0
Joined: August 8th, 2006, 8:02 pm

Good C++ text

November 15th, 2008, 7:02 am

QuoteOriginally posted by: jawabeanQuoteOriginally posted by: ananihdvThere is only one STL book which follows this Generic Algorithm approach: did u mean generic programming? there's a bunch of books on STL and GP. including one from the vreator of STL, StepanovStepanov's book looks like a STL code commentry.There are many reasons I recommed Austern's book than other bunch of books on STL and GP.1. He starts with Algorithms and ends in Containers. This is the right way to understand STL. Other books just confuse you about STL.2. He introduces the term concept, which is now part of C++ language itself. Concepts3. An array class template example he shows in his book written 10 years ago is now part of tr1( the class template array<Ty, N>.)The only issue with this book is, almost half of the book is available online in SGI's STL website.
 
User avatar
Cuchulainn
Posts: 23029
Joined: July 16th, 2004, 7:38 am

Good C++ text

November 15th, 2008, 7:16 am

QuoteI don't think you used Austern's book. It was published only in Oct 99.Well if I said I did, then I did. I might be a few years out on the year. It has quite a few bugs. It is not a book for learning STL, if I can remember. QuoteJosuttis is good, but it is about 1000 pages. Austern covers the same in 100 pages. Which one do you prefer? Josuttis is better in this case; I need to know how a STL feature works and quick, so I go to the relevant page. I know/knew generics from the beginning of the 90's; it's a question of knowing where to find the information fast and Josuttis is just fine. In this case 'more is better'.Quote1. He starts with Algorithms and ends in Containers. This is the right way to understand STL. Other books just confuse you about STL.2. He introduces the term concept, which is now part of C++ language itself. 1. Depends on your viewpoint, some use STL containters only.2. Good, but concepts are still not in any compilers, to my knowledge. edit:Quote3. An array class template example he shows in his book written 10 years ago is now part of tr1( the class template array<Ty, N>.)Ada has these as well.Anyways, it was only recently tht compilers supported this rather useful feature..
Last edited by Cuchulainn on November 14th, 2008, 11:00 pm, edited 1 time in total.
 
User avatar
ananihdv
Posts: 0
Joined: August 8th, 2006, 8:02 pm

Good C++ text

November 15th, 2008, 10:48 am

QuoteOriginally posted by: CuchulainnQuoteI don't think you used Austern's book. It was published only in Oct 99. It has quite a few bugs. It is not a book for learning STL, if I can remember. Please mention those bugs. I will stop programming in C++ if you find at least one serious bug in this book. Thank god, you did not mention Introduction to C++ for Financial Engineers:An Object-Oriented Approach as the best introduction to STL.
 
User avatar
Cuchulainn
Posts: 23029
Joined: July 16th, 2004, 7:38 am

Good C++ text

November 15th, 2008, 11:28 am

QuoteOriginally posted by: ananihdvQuoteOriginally posted by: CuchulainnQuoteI don't think you used Austern's book. It was published only in Oct 99. It has quite a few bugs. It is not a book for learning STL, if I can remember. Please mention those bugs. I will stop programming in C++ if you find at least one serious bug in this book. Thank god, you did not mention Introduction to C++ for Financial Engineers:An Object-Oriented Approach as the best introduction to STL.Nor does it pretend to be. Josuttis does a much better job. Just because you find it a great book does not mean that others do, nor should you expect them to. You are not Austern himself by any chance edit: Generic Programming is much broader than STL. What about modern services, required/provided interfaces?
Last edited by Cuchulainn on November 14th, 2008, 11:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 23029
Joined: July 16th, 2004, 7:38 am

Good C++ text

November 15th, 2008, 6:33 pm

I have found Austern's 1999 book (as well as Musser&Saini) from the recesses of my bookcases. A summary of Austern is that it is a rather complete syntax description of STL, a reference manual if you will. Nothing wrong in principle except that my students and clients wanted real examples at the time. Their feedback was that the book did not provide this because book is about 5% code examples. Chapter 8 (function objects) has 1 trivial example. So, I tried something else. This is a book that is more appropriate for CS rather than engineering, in my experience.I retract: the book does not have many bugs. I was mistaking it for M&S which has the same (blue) cover. I used M&S 1996 which had more examples. BTW this is the book where the code did not work in C++ 5.0, 6.0 (whatever). Maybe compiler was wrong? (times()?? multiply()?? functions).So, Josuttis was a Godsend; runnable examples and less CS syntax (in this particular case because software developers make products).People understand examples better than the theory in order to learn a new concept (this is a well-known principle due to Ausubel). That's why Josuttis is fine in my opinion.This has felt like a trip down memory pre-Internet-crash lane...
Last edited by Cuchulainn on November 14th, 2008, 11:00 pm, edited 1 time in total.
 
User avatar
theitalianjob
Posts: 0
Joined: April 21st, 2007, 5:09 pm

Good C++ text

November 18th, 2008, 8:40 pm

I think Modern C++ design by Andrej Alexandrescu is good book for non trivial template programming. Probably a little bit tough to start... with templates but good after for example Bruce Eckel second volume.
 
User avatar
Cuchulainn
Posts: 23029
Joined: July 16th, 2004, 7:38 am

Good C++ text

November 19th, 2008, 12:17 pm

QuoteOriginally posted by: theitalianjobI think Modern C++ design by Andrej Alexandrescu is good book for non trivial template programming. Probably a little bit tough to start... Not probably , for sure!Yes, policy based design only gets 2 pages. BTW why no UML diagrams?The Loki library is deprecated I woud imagine, boost has it all and more.have you see Josuttis and vanderWoorden on modern templates?
Last edited by Cuchulainn on November 18th, 2008, 11:00 pm, edited 1 time in total.