Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!microsoft!jimad From: jimad@microsoft.UUCP (JAMES ADCOCK) Newsgroups: comp.lang.c++ Subject: Book Review: "The C++ WorkBook", Wiener & Pinson Message-ID: <51031@microsoft.UUCP> Date: 20 Feb 90 20:08:06 GMT Reply-To: jimad@microsoft.UUCP (JAMES ADCOCK) Organization: Microsoft Corp., Redmond WA Lines: 70 I just found and bought another C++ book: "The C++ Workbook" Wiener & Pinson, 349 pgs Addison-Wesley 1990 ISBN: 0-201-50930-X $28.95 [at my local bookstore] So far I've read four of nine classes, and have not been impressed. I greatly prefer Hanson's "The C++ Answer Book" in spite of the fact that Hanson's book is based primarily on the 1.2 version of the language, while "The C++ Workbook" claims to be based on 2.0 But "The C++ Workbook" gets some of the important 2.0 stuff totally wrong, so I'm not sure that the fact that Hanson's book is based on 1.2 is a relative disadvantage. For example, "The C++ WorkBook" claims: " When declaring a data member to be *static* it *must not require initialization*. For ordinary C-types, the static declaration causes no problems because ordinary C-types do not require initialization. See, for example, *static int small* in class A and *static int count* in class B in Listing 3.17. *If an instance variable of a class is to be declared as static, the requirement for no initialization requires that the class have no constructors and, further, that none of its data members be instances of a class with constructors.* A number of variations on the use of static declarations with the resulting acceptance by CFront are given in Listing 3.17" --Which is dead wrong, and would lead a person not knowing better to beleive that static instances have almost no applicability. ***Sigh*** For comparison, Lippman gets the description of static members dead right, and very clearly, concisely, and correctly states their usages and the issues involved. Program examples in "The C++ Workbook" are given in an very-large, bold, sans-serif, variable spaced text. Indentation is by about half a character width. Many examples are very abstract: [quote] class Second { private: int anInt = 6; // error; initialization not allowed int anotherInt; public; [sic] Second( void ){anInt = 6;} Second( int inInt3m int inInt4 ) : anInt( inInt3 ), anotherInt( inInt4 ) {} [unquote] etc. Thus, I find it hard to extract meaningful information from the programming examples. If I finish the book, and change my mind about it, I will post again. The book does include more of the OOP buzz-words than most C++ texts. For reference, compare to: "C++ Primer", Lippman, Addison-Wesley, 1989, ISBN 0-201-16487-6, 464 pgs "The C++ Answer Book", Hansen, Addison-Wesley, 1990, ISBN 0-201-11497-6, 578 pgs, $26.95 [standard disclaimer]