Path: utzoo!utgpu!watserv1!watmath!att!att!linac!uwm.edu!rpi!crdgw1!uunet!microsoft!jimad From: jimad@microsoft.UUCP (Jim ADCOCK) Newsgroups: comp.lang.c++ Subject: Book of the Week Club Message-ID: <59405@microsoft.UUCP> Date: 28 Nov 90 19:13:13 GMT Reply-To: jimad@microsoft.UUCP (Jim ADCOCK) Organization: Microsoft Corp., Redmond WA Lines: 30 Just went down to my local bookstore and found a couple more new books on C++. One by Stevens on C++ and Fractals [actually, looks like its more on ray-tracing than anything] _might_ be of specialized interest to people with a strong interest in both. The other I picked up and am about half way through, and it seems good: A C++ Toolkit Jonathan S. Shapiro Prentice Hall 1991 ISBN 0-13-127663-8 Shapiro's thesis is that one should make a bunch of small stand-alone toolkit classes: Linked Lists, Hash Tables, Ref Counted Ptrs, etc, and reuse them rather than gin up these common programming techniques on the fly each time you need them. Lots of practical suggetions. Forest rather than the tree approach. Shapiro does the uncommon but nice thing of explicitly allowing public use of the code in his book. Be forwarned however that in his ref counted pointer class he makes the common mistake of decrementing the old referenced object before incrementing the new referenced object. This has the effect of possibly prematurely deleting the old referenced object when it is the same object as the newly referenced object. Probably the best fix is just to explicitly test against the possibility that the old and new objects are the same. In any case, I like this book a lot and recommend it. Examples include: SimpleString, Point, Rectangle, Square, GeomObject, Point3d, Set256, BitSet, Link, List, Array, BoundedArray, BinaryTree, HashTable, Pointer, Ref Counted Ptr, Atoms.