infuerno.github.io

Stroustrup 4th Ed 1 Notes To The Reader

Notes to the Reader

The Design of C++

Programming style

Language features exist to support programming styles. C++ language feature support four programming styles:

Type checking

Static types and compile time checking is central to C++.

Learning C++

C++ is a language that you can grow with.

To gain the benefits of C++, programmers coming to it from a different language must learn and internalize idiomatic C++ programming style and technique. The same applies to pro- grammers used to earlier and less expressive versions of C++.

Some guidelines:

Exercises

  1. (*1) What does (2.5) mean for an exercise?

    It will take between 1 hour and 1 day, it is a little more than a drill, but not fantastically challenging.

  2. (*2) Briefly describe the design aims of C++ and comment on the extent to which C++ meets those.

  3. (*4) Write an essay: What can a good programming language do for you and what can’t you expect it to help with?

  4. (*1) What are the main programming styles supported by C++?

    Procedural programming, data abstraction, object-oriented programming, generic programming

  5. (*2.5) List five language features offered by the 1985 version of C++, five features added by C++98, and finally five new features added by C++11. In each case, order the features in order of importance and for each feature write a sentence describing its role in programming.

  6. (*3) Describe the difference between dynamic (run-time) and static (compile-time) type checking and outline the strengths and weaknesses of each.

  7. (*1.5) List the major components of the C++ standard library.

  8. (*1.5) List five libraries that you would have liked to be part of the standard.

  9. (*1) List three (or more) advantages from having a library as part of the standard.

  10. (*3) List 20 major real-world C++ applications.

  11. (*2) From §1.3 pick five suggestions that to you looks most likely to help improve your programming style.

  12. (*2) Make a ‘‘top-ten list’’ of helpful design and programming rules. Hint: §X.2.