[comp.lang.c++] C++ textbooks

sakkinen@tukki.jyu.fi (Markku Sakkinen) (06/16/89)

In article <9474@alice.UUCP> bs@alice.UUCP (Bjarne Stroustrup) writes:
>
...
>Should any of this increase your interest to the point where reading a
>textbook seems worth the effort here is a selection (in chronological order
>more or less):

...
>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.
My review of it is pending for ACM Computing Reviews.
The companion book with the authors in reverse order and 'Smalltalk'
instead of 'C++' is apparently better, although it seems to explain
such a basic concept as 'super' incorrectly.

Markku Sakkinen
Department of Computer Science
University of Jyvaskyla (a's with umlauts)
Seminaarinkatu 15
SF-40100 Jyvaskyla (umlauts again)
Finland

roelof@idca.tds.PHILIPS.nl (R. Vuurboom) (06/19/89)

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 <stream.h>

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 <stream.h> 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

jima@hplsla.HP.COM (Jim Adcock) (06/19/89)

> Who distributes 'The C++ Report'?

Can anyone give us a review of 'The C++ Report' ??? Maybe the index out of one
issue or something? -- I've asked for a trial copy about four times, 
and each time they send me a copy of JOOP instead!

[I already have acces to JOOP.]

) Seaman) (06/22/89)

roelof@idca.tds.PHILIPS.nl (R. Vuurboom) writes:
< markku@jytko.jyu.fi (Markku Sakkinen) 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.

I *don't* mean to start a war, and while I agree that Stroustrup's book is
much too confusing to the C++ novice, I think it only fair to point out
that it isn't really intended as a tutorial.  As a reference, it is
very good (when is the edition covering 2.0 coming out?? :-) ).  Since
I haven't read Wiener & Pinson, I don't want to sound at all as if I
am knocking their book.  It may very well be an excellent tutorial.

[ Discussion of confusing example 'cout << "Hello world\n";' ... ]

[ Quote from BS ]
< 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?] ...

Actually, referring to the '<<' as a left shift might have served to
make the example even MORE confusing :-).  I say this because it alludes
to the 'C' use of the '<<' operator, which has no bearing on its function
here.  Once an operator has been overloaded for a class, identifying it
by its 'standard' meaning does little or nothing to explain its overloaded
usage.

< 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.

This is probably the best approach to 'self-teaching' C++.

< Roelof Vuurboom  SSP/V3   Philips TDS Apeldoorn, The Netherlands

By the way, what are peoples' opinions of Stephen Dewhurst & Kathy Stark's
new book, 'Programming in C++', from Prentice Hall?  I just picked up a
copy (at the Usenix conference in Baltimore), and it looks pretty good,
so far.

-- 
Chris (Insert phrase here) Seaman |   o\  /o                See
crs@cpsc6a.att.com <or>           |     ||     "Attack of the Killer Smiley"!
...!att!cpsc6a!crs                |  \vvvvvv/           Coming Soon
                                  |   \____/      to a newsgroup near you!

pete@andromeda.rutgers.edu.rutgers.edu (Peter Farabaugh) (06/22/89)

In article <550@cpsc6b.cpsc6a.att.com> crs@cpsc6b.cpsc6a.att.com (Chris (HA!! I *KILL* me!!) Seaman) writes:
>roelof@idca.tds.PHILIPS.nl (R. Vuurboom) writes:
>< markku@jytko.jyu.fi (Markku Sakkinen) writes:
>[ Discussion of confusing example 'cout << "Hello world\n";' ... ]
>
>[ Quote from BS ]
>< 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?] ...
>
>Actually, referring to the '<<' as a left shift might have served to
>make the example even MORE confusing :-).  I say this because it alludes
>to the 'C' use of the '<<' operator, which has no bearing on its function
>here.  Once an operator has been overloaded for a class, identifying it
>by its 'standard' meaning does little or nothing to explain its overloaded
>usage.
>
	I think that referring to the << and >> operators as put to and get
from is a good idea. Shift left and right is to confusing and less-than-sign-
less-than-sign, greater-than-sign-greater-than-sign is stupid. 
	Put to and get from are easy to say, learn , and understand the 
function of. [oops, ended a sentence with a preposition. awful isn't it?] 


	Does any one have such a name for () and [] function-call-operator
and subscripting-operator are plain ugly.

					Peter Farabaugh

******************************************************************************
     "Women, can't live with 'em, can't shoot 'em!"--Stephen Wright
******************************************************************************
   "When the world is running down, you make the best of what's still around"
   						-The Police
******************************************************************************
_____________		From the dark recesses of the mind of 
|____ | __  | 
| | __| |___|				Peter Farabaugh
| |_____  | | <- My Mind 		..topaz!andromeda!pete
|____  |__  |			   (all this and a drop of Retsen)
|___________|
NET:..topaz!andromeda!pete
USMAIL:519 Prospect St., Nutley, N.J. 07110
MA BELL: 201-667-3784
PLANET: Earth
GALAXY: Milky Way
******************************************************************************
   "What? Me have opinions? You must have me confused with someone else!"
******************************************************************************
******************************************************************************
     "Women, can't live with 'em, can't shoot 'em!"--Stephen Wright
******************************************************************************
   "When the world is running down, you make the best of what's still around"
   						-The Police
******************************************************************************
_____________		From the dark recesses of the mind of 
|____ | __  | 
| | __| |___|				Peter Farabaugh
| |_____  | | <- My Mind 		..topaz!andromeda!pete
|____  |__  |			   (all this and a drop of Retsen)
|___________|
NET:..topaz!andromeda!pete
USMAIL:519 Prospect St., Nutley, N.J. 07110
MA BELL: 201-667-3784
PLANET: Earth
GALAXY: Milky Way
******************************************************************************
   "What? Me have opinions? You must have me confused with someone else!"
******************************************************************************

jss@hector.UUCP (Jerry Schwarz) (06/26/89)

In article <Jun.21.20.51.33.1989.27612@galaxy.rutgers.edu> pete@andromeda.rutgers.edu.UUCP (Peter Farabaugh) writes:
>	I think that referring to the << and >> operators as put to and get
>from is a good idea. Shift left and right is to confusing and less-than-sign-
>less-than-sign, greater-than-sign-greater-than-sign is stupid. 

For the record, the 2.0 iostream documentation (which I had a part in
writing) refers to << and >> as insertion and extraction operators
repsectively, and to the variants for a particular type T as the T
insertor and T extractor.

I find this terminology clear and concise.  I hope it catches on.

Jerry Schwarz
AT&T Bell Labs, Murray Hill

rfg@pink.ACA.MCC.COM (Ron Guilmette) (07/03/89)

In article <11700@ulysses.homer.nj.att.com> jss@hector.UUCP (Jerry Schwarz) writes:
>
>For the record, the 2.0 iostream documentation (which I had a part in
>writing) refers to << and >> as insertion and extraction operators...
>
>I find this terminology clear and concise.  I hope it catches on.

Right Jerry.  I'm going to go insert a letter to my dear mother as
soon as I finish extracting the morning paper.  :-)


-- 
// Ron Guilmette  -  MCC  -  Experimental Systems Kit Project
// 3500 West Balcones Center Drive,  Austin, TX  78759  -  (512)338-3740
// ARPA: rfg@mcc.com
// UUCP: {rutgers,uunet,gatech,ames,pyramid}!cs.utexas.edu!pp!rfg