Nicht aus der Schweiz? Besuchen Sie lehmanns.de
Ruminations on C++ - Andrew Koenig, Barbara E. Moo

Ruminations on C++

A Decade of Programming Insight and Experience
Buch | Softcover
400 Seiten
1996
Addison Wesley (Verlag)
978-0-201-42339-6 (ISBN)
CHF 46,30 inkl. MwSt
  • Titel ist leider vergriffen;
    keine Neuauflage
  • Artikel merken
This text brings together the knowledge and experience of the two authors. They explain why C++ is worth learning, its standardization in 1997 and then move on to the most important elements of the language.
A book that stands out from the herd. Ruminations on C++ concentrates on the key C++ ideas and programming techniques--skimming the cream--to let you understand the "why" and not just the "how" of C++ programming. You need not be an expert C++ programmer to find solid fodder here, yet even experts need not fear overgrazing: You will find something worth chewing on in every chapter. This should be your next C++ book, because it *covers a broad range of C++ ideas and techniques, from detailed code examples to design principles and philosophy *shows how to think about programming in C++, not just how to follow rules *explains the motivation behind its examples; sometimes even solving the same problem in two different ways *covers both object-oriented programming and generic programming *explains the ideas behind the Standard Template Library, which is the most important recent innovation in C++. This book comes to you from two people who started using C++ when its entire user community could still fit in one room. Both of them have contributed significantly to the evolution of C++. 0201423391B04062001

Andrew Koenig is a member of the Large-Scale Programming Research Department at AT&T's Shannon Laboratory, and the Project Editor of the C++ standards committee. A programmer for more than 30 years, 15 of them in C++, he has published more than 150 articles about C++, and speaks on the topic worldwide. Barbara E. Moo is an independent consultant with 20 years' experience in the software field. During her nearly 15 years at AT&T, she worked on one of the first commercial products ever written in C++, managed the company's first C++ compiler project, and directed the development of AT&T's award-winning WorldNet Internet service business. 0

Preface.


Prelude.


First Try.



Doing it without Classes.



Why was it Easier in C++?



A Bigger Example.



Conclusion.

I. MOTIVATION.

1. Why I Use C++.


The Problem.



History and Context.



Automatic Software Distribution.



Enter C++.



Recycled Software.



Postscript.

2. Why I Work on C++.


The Success of Small Projects.



Abstraction.



Machines Should Work for People.

3. Living in the Real World.
II. CLASSES aND INHERITANCE.

4. Checklist for Class Authors.
5. Surrogate Classes.


The Problem.



The Classical Solution.



Virtual Copy Functions.



Defining a Surrogate Class.



Summary.

6. Handles: Part 1.


The Problem.



A Simple Class.



Attaching a Handle.



Getting at the Object.



Simple Implementation.



Use-Counted Handles.



Copy on Write.



Discussion.

7. Handles: Part 2.


Review.



Separating the use Count.



Abstraction of use Counts.



Access Functions and Copy on Write.



Discussion.

8. An Object-Oriented Program.


The Problem.



An Object-Oriented Solution.



Handle Classes.



Extension 1: New Operations.



Extension 2: New Node Types.



Reflections.

9. Analysis of a Classroom Exercise: Part 1.


The Problem.



Designing the Interface.



A Few Loose Ends.



Testing the Interface.



Strategy.



Tactics.



Combining Pictures.



Conclusion.

10. Analysis of a Classroom Exercise: Part 2.


Strategy.



Exploiting the Structure.



Conclusion.

11. When not to use Virtual Functions.


The Case For.



The Case Against.



Destructors are Special.



Summary.

III. TEMPLATES.

12. Designing a Container Class.


What Does it Contain?



What Does Copying the Container Mean?



How Do You Get at Container Elements?



How Do You Distinguish Reading from Writing?



How Do You Handle Container Growth?



What Operations Does the Container Provide?



What Do You Assume about the Container Element Type?



Containers and Inheritance.



Designing an Arraylike Class.

13. Accessing Container Elements.


Imitating a Pointer.



Getting at the Data.



Remaining Problems.



Pointer to Const Array.



Useful Additions.

14. Iterators.


Completing the Pointer Class.



What is an Iterator?



Deleting an Element.



Deleting the Container.



Other Design Considerations.



Discussion.

15. Sequences.


The State of the Art.



A Radical Old Idea.



Well, Maybe a Few Extras.



Example of Use.



Maybe a Few More.



Food for Thought.

16. Templates as Interfaces.


The Problem.



The First Example.



Separating the Iteration.



Iterating Over Arbitrary Types.



Adding Other Types.



Abstracting the Storage Technique.



The Proof of the Pudding.



Summary.

17. Templates and Generic Algorithms.


A Specific Example.



Generalizing the Element Type.



Postponing the Count.



Address Independence.



Searching a Nonarray.



Discussion.

18. Generic Iterators.


A Different Algorithm.



Categories of Requirements.



Input Iterators.



Output Iterators.



Forward Iterators.



Bidirectional Iterators.



Random-Access Iterators.



Inheritance?



Performance.



Summary.

19. Using Generic Iterators.


Iterator Types.



Virtual Sequences.



An Output-Stream Iterator.



An Input-Stream Iterator.



Discussion.

20. Iterator Adaptors.


An Example.



Directional Asymmetry.



Consistency and Asymmetry.



Automatic Reversal.



Discussion.

21. Function Objects.


An Example.



Function Pointers.



Function Objects.



Function-Object Templates.



Hiding Intermediate Types.



One Type Covers Many.



Implementation.



Discussion.

22. Function Adaptors.


Why Function Objects?



Function Objects For Built-In Operators.



Binders.



A Closer Look.



Interface Inheritance.



Using These Classes.



Discussion.

IV. LIBRARIES.

23. Libraries in Everyday Use.


The Problem.



Understanding the Problem—Part 1.



Implementation—Part 1.



Understanding the Problem—Part 2.



Implementation—Part 2.



Discussion.

24. An Object Lesson in Library-Interface Design.


Complications.



Improving the Interface.



Taking Stock.



Writing the Code.



Conclusion.

25. Library Design is Language Design.


Character Strings.



Memory Exhaustion.



Copying.



Hiding the Implementation.



Default Constructor.



Other Operations.



Substrings.



Conclusion.

26. Language Design is Library Design.


Abstract Data Types.



Libraries and Abstract Data Types.



Memory Allocation.



Memberwise Assignment and Initialization.



Exception Handling.



Summary.

V. TECHNIQUE.

27. Classes that Keep Track of Themselves.


Design of a Trace Class.



Creating Dead Code.



Generating Audit Trails for Objects.



Verifying Container Behavior.



Summary.

28. Allocating Objects in Clusters.


The Problem.



Designing the Solution.



Implementation.



Enter Inheritance.



Summary.

29. Applicators, Manipulators, and Function Objects.


The Problem.



A Solution.



A Different Solution.



Multiple Arguments.



An Example.



Abbreviations.



Musings.



Historical Notes, References, and Acknowledgments.

30. Decoupling Application Libraries from Input-Output.


The Problem.



Solution 1: Trickery and Brute Force.



Solution 2: Abstract Output.



Solution 3: Trickery without Brute Force.



Remarks.

VI. WRAPUP.

31. Simplicity through Complexity.


The World is Complicated.



Complexity Becomes Hidden.



Computers are no Different.



Computers Solve Real Problems.



Class Libraries and Language Semantics.



Making Things Easy is Hard.



Abstraction and Interface.



Conservation of Complexity.

32. What Do You Do After You Say Hello World?


Find the Local Experts.



Pick a Tool Kit and Become Comfortable with it.



Some Parts of C are Essential.



But Others are not.



Set Yourself a Series of Problems.



Conclusion.

Index. 0201423391T04062001

Erscheint lt. Verlag 24.9.1996
Verlagsort Boston
Sprache englisch
Themenwelt Informatik Programmiersprachen / -werkzeuge C / C++
ISBN-10 0-201-42339-1 / 0201423391
ISBN-13 978-0-201-42339-6 / 9780201423396
Zustand Neuware
Haben Sie eine Frage zum Produkt?
Mehr entdecken
aus dem Bereich