REVIEW - C++ Unleashed


Title:

C++ Unleashed

Author:

Jesse Liberty

ISBN:

Publisher:

Sams (1999)

Pages:

918pp

Reviewer:

Francis Glassborow

Reviewed:

June 1999

Rating:

★★☆☆☆


Books with multiple authors are exceptionally difficult to review unless the editor/lead author has laid down some very careful guidelines and acted to enforce them.

The front cover of this book proclaims that it uses the final ANSI/ISO C++ Standard (a big plus point for remembering ISO in that). Inside the Jesse Liberty writes:

C++ Unleashed assumes you have read at least one good primer (such as Sams Teach Yourself C++ in 21 Days) and/or have been programming in C++ for at least six months. More experienced programmers will find detail on subjects they may not have considered before; less experienced programmers will find a host of new ideas, information and best practices.

I will leave aside that I and Jesse Liberty clearly have somewhat different ideas as to what constitutes a good primer. However he has unambiguously held up the contents of this book as an example to less experienced programmers. He should have no problems then, if I focus on a few of the shortcomings from the perspective of such readers (actually, even now, the vast majority of C++ programmers come under the heading of 'less experienced' even if they think otherwise.

The first glaring misdemeanour is that in several places the old headers (terminated with .h) are used. This is not just a style issue. The new style headers actually provide different things in some cases. For example the stream library has been substantially rewritten and what you get with #include is substantially different in a number of subtle ways from #include

I will live with the frequent use of using directives to dump the whole of namespace std into the global namespace even though I think that use of fully qualified names would be better in many cases. However I was rather staggered to find the following code:

while(1) {   do {if(strProductID == "0")        return;       } while ((pProduct = Pmap.Find(strProductID)) == 0);}
In other words a 'forever' loop in which the exit is via a return from a nested loop. Sorry, that is not code of a standard that I find acceptable.

Then there are the effectively pointless chapters such as the one on Designing Efficient Sorting Methods. Pointless because just about everything you need can be found in the STL part of the C++SL. This chapter also highlights the poor quality of layout and typography that characterise parts of this book. For example in a table comparing sort methods (algorithms) we have O(n2) written for O(n 2 ) and O(nlog2n) for O(nlog 2 n). The latter is particularly silly as it is ambiguous (perhaps the base of the logarithm was intended. It would have been much better to have written O(n(log n) 2 ).

The general principles of this book are good and a careful reader could learn a lot from it. However it is marred by many little flaws. Too often the source code is either of poor quality (OK if read by an experienced reader who will gut it for an idea while ignoring the implementation detail) or is frankly tedious. The layout leaves much to be desired (C++ style comments should always be checked for wrap round) which speaks volumes for the (lack of) attention to detail provided by the copy editors and the other responsible for bringing the work to publication. There was no need to rush this book into print, the C++ standard will be around for a good number of years. Another six months getting the material cleaned up, thinking about the exact content, requiring contributors to rewrite their material etc. would have made all the difference.

If you are the kind of C++ programmer who struggles with the level of C++ covered in C Vu, leave this book in the bookshop. If you are rather more fluent, browse it a bit before parting with your money. It is not bad but it could have been so much better.


Book cover image courtesy of Open Library.





Your Privacy

By clicking "Accept Non-Essential Cookies" you agree ACCU can store non-essential cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

Current Setting: Non-Essential Cookies REJECTED


By clicking "Include Third Party Content" you agree ACCU can forward your IP address to third-party sites (such as YouTube) to enhance the information presented on this site, and that third-party sites may store cookies on your device.

Current Setting: Third Party Content EXCLUDED



Settings can be changed at any time from the Cookie Policy page.