C++ Programming Style
Cargill, Tom
C++ supports programming-in-the-large, allowing relationships between different parts of a program to be expressed. The scope of C++ programming style therefore goes beyond traditional in-the-small issues which relate to the details of line-by-line coding. This book examines the use of the in-the-large language features of C++, which sometimes confuse even experienced programmers. The author demonstrates that unwarranted use of the more powerful language features may lead to cluttered programs which are harder to comprehend and sometimes less efficient than more straightforward alternatives. Cargill rewrites several programs, using techniques that range from improving consistency to removing redundant inheritance. The presentation simulates a code review, in which readers may independently evaluate and criticize alternative approaches to programming problems, and then compare their analyses with those of the author.
Design and coding style rules are distilled from the examples. Understanding and following these rules will help professional programmers design and write better C++ programs.
A chapter is devoted to each of the following topics:
- abstractions
- operator overloading
- consistency
- wrappers
- unnecessary inheritance
- efficiency
- virtual functions
0201563657B04062001
Today's languages have new capabilities, creating new questions on how the components should fit together. Using a learn-by-example approach, Cargill presents code from published sources--each example representing a common error made by C++ programmers--and shows readers how to critically examine and rewrite it.
Name in long format: | C++ Programming Style |
---|---|
ISBN-10: | 0201563657 |
ISBN-13: | 9780201563658 |
Book pages: | 248 |
Book language: | en |
Edition: | 1 |
Binding: | Paperback |
Publisher: | Addison-Wesley Professional |
Dimensions: | Height: 9.2 Inches, Length: 7.38 Inches, Weight: 0.9700339528 Pounds, Width: 0.64 Inches |