Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!mcvax!hp4nl!philapd!ssp1!roelof From: roelof@idca.tds.PHILIPS.nl (R. Vuurboom) Newsgroups: comp.lang.c++ Subject: Re: C++ textbooks (was: C++ design) Keywords: information Message-ID: <137@ssp1.idca.tds.philips.nl> Date: 19 Jun 89 10:24:07 GMT References: <9474@alice.UUCP> <916@tukki.jyu.fi> Organization: Philips Telecommunication and Data Systems, The Netherlands Lines: 79 In article <916@tukki.jyu.fi> markku@jytko.jyu.fi (Markku Sakkinen) SAKKINEN@FINJYU.bitnet (alternative) writes: > >... >>Wiener, Richard S., Pinson, Lewis J.: "An Introduction to Object-Oriented >> Programming and C++," Addison-Wesley, 1988. >... > >Sorry, but I would not recommend this book. I would. When I started along the C++ track I first started reading Stroustrups book and got confused. Backtracked to Wiener and Pierson and found this easier going. I then returned to Stroustrup. Wiener and Pierson gave (me) lucid answers to what was object-oriented about C++ and that relatively early on in the book. I think a lot of people start on C++ looking for answers to these questions as I did. The reason I got confused (and demotivated) when I started out on Stroustrups book was not because it wasn't well structured or wasn't well written but because it wasn't answering the questions I was asking David Geary points this out also in a previous posting: I was suprised to find that BS does not extol upon the virtues of OOP. C++ seems to be presented more as simply a "better C". BS does show the benefits of OOP using C++, but they are scattered throughout the book, and the idea of OOP is not consolidated. For example, on page 213, we find: Also the level of detail (although correct) is large for a beginner: for example, the very first example, #include main() { cout << "Hello, world\n"; } carries the following explanation annotated with what I think my thoughts were the _first_ time I read it. The line #include instructs the compiler to _include_ the declarations of the standard stream input and output facilities as found in the file stream.h [So we've got the preprocessor include keyword nothing new here...] Without these declarations, the expression cout<<"Hello, world\n" would make no sense. [Huh? Is cout some sort of typedef exported by stream.h? No that can't be. Must be a variable of some sort. But surely you're not _defining_ cout in stream.h? Better read further...] The operator << ("put to"+) [Huh? put to what? Let me put this to you Stroustrup thats a damned left shift] writes its second argument [I don't see any arguments] onto its first [??? how do you write an argument _onto_ another argument?] (in this case, the string "Hello, world\n" onto the standard output stream cout [I'm lost...The guys using a left shift operator to do a printf and I thought C++ could do everything C could do... so whats wrong with printfs? Suddenly out of fashion? And this is the first example, so I guess it must be showing the power of C++. Gee I can use a left shift to do a printf...] Of course, now we all look back and laugh at this train of thought. :-) :-) But it wasn't getting me any nearer to the answer of why C++ was so great. When I went back to bs after reading W&P and knowing the answers to the questions I wanted answering I could concentrate on the language _details_ which bs so well describes and not the language _issues_ to which bs does too little justice. -- Roelof Vuurboom SSP/V3 Philips TDS Apeldoorn, The Netherlands +31 55 432226 domain: roelof@idca.tds.philips.nl uucp: ...!mcvax!philapd!roelof