04.01.2015 Views

Thinking in C++ 2nd ed Volume 1 Revision 6

Thinking in C++ 2nd ed Volume 1 Revision 6

Thinking in C++ 2nd ed Volume 1 Revision 6

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

us<strong>in</strong>g “toy examples,” but I’m will<strong>in</strong>g to accept that <strong>in</strong> favor of<br />

produc<strong>in</strong>g someth<strong>in</strong>g p<strong>ed</strong>agogically useful.<br />

3. Carefully sequence the presentation of features so that you<br />

aren’t see<strong>in</strong>g someth<strong>in</strong>g you haven’t been expos<strong>ed</strong> to. Of<br />

course, this isn’t always possible; <strong>in</strong> those situations, a brief<br />

<strong>in</strong>troductory description will be given.<br />

4. Give you what I th<strong>in</strong>k is important for you to understand<br />

about the language, rather than everyth<strong>in</strong>g I know. I believe<br />

there is an “<strong>in</strong>formation importance hierarchy,” and there are<br />

some facts that 95% of programmers will never ne<strong>ed</strong> to know<br />

and would just confuse them and add to their perception of<br />

the complexity of the language. To take an example from C, if<br />

you memorize the operator prec<strong>ed</strong>ence table (I never did),<br />

you can write clever code. But if you have to th<strong>in</strong>k about it, it<br />

will confuse the reader/ma<strong>in</strong>ta<strong>in</strong>er of that code. So forget<br />

about prec<strong>ed</strong>ence, and use parentheses when th<strong>in</strong>gs aren’t<br />

clear. This same attitude will be taken with some <strong>in</strong>formation<br />

<strong>in</strong> the <strong>C++</strong> language, which I th<strong>in</strong>k is more important for<br />

compiler writers than for programmers.<br />

5. Keep each section focus<strong>ed</strong> enough so the lecture time – and<br />

the time between exercise periods – is small. Not only does<br />

this keep the audience’s m<strong>in</strong>ds more active and <strong>in</strong>volv<strong>ed</strong><br />

dur<strong>in</strong>g a hands-on sem<strong>in</strong>ar, it gives the reader a greater sense<br />

of accomplishment.<br />

6. Provide readers with a solid foundation so they can<br />

understand the issues well enough to move on to more<br />

difficult coursework and books (<strong>in</strong> particular, <strong>Volume</strong> 2 of<br />

this book).<br />

7. I’ve endeavor<strong>ed</strong> not to use any particular vendor’s version of<br />

<strong>C++</strong> because, for learn<strong>in</strong>g the language, I don’t th<strong>in</strong>k that the<br />

details of a particular implementation are as important as the<br />

language itself. Most vendors’ documentation concern<strong>in</strong>g<br />

their own implementation specifics is adequate.<br />

26 <strong>Th<strong>in</strong>k<strong>in</strong>g</strong> <strong>in</strong> <strong>C++</strong> www.BruceEckel.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!