Programación en c++

Páginas: 189 (47147 palabras) Publicado: 22 de agosto de 2012
More Effective C++ | Book

Continue to Acknowledgments

Dedication
For Clancy, my favorite enemy within.
Back to Dedication
Continue to Introduction

Acknowledgments
A great number of people helped bring this book into existence. Some contributed ideas for technical topics, some helped with the
process of producing the book, and some just made life more fun while I was working on it.When the number of contributors to a book is large, it is not uncommon to dispense with individual acknowledgments in favor of a
generic "Contributors to this book are too numerous to mention." I prefer to follow the expansive lead of John L. Hennessy and David
A. Patterson in °Computer Architecture: A Quantitative Approach (Morgan Kaufmann, 1995). In addition to motivating the
comprehensiveacknowledgments that follow, their book provides hard data for the 90-10 rule, which I refer to in Item 16.
The Items
With the exception of direct quotations, all the words in this book are mine. However, many of the ideas I discuss came from others. I
have done my best to keep track of who contributed what, but I know I have included information from sources I now fail to recall,
foremost amongthem many posters to the Usenet newsgroups °comp.lang.c++ and °comp.std.c++.
Many ideas in the C++ community have been developed independently by many people. In what follows, I note only where I was
exposed to particular ideas, not necessarily where those ideas originated.
Brian Kernighan suggested the use of macros to approximate the syntax of the new C++ casting operators I describe in Item2.
In Item 3, my warning about deleting an array of derived class objects through a base class pointer is based on material in Dan Saks'
"Gotchas" talk, which he's given at several conferences and trade shows.
In Item 5, the proxy class technique for preventing unwanted application of single-argument constructors is based on material in
Andrew Koenig's column in the January 1994 °C++ Report.James Kanze made a posting to °comp.lang.c++ on implementing postfix increment and decrement operators via the
corresponding prefix functions; I use his technique in Item 6.
David Cok, writing me about material I covered in Effective C++, brought to my attention the distinction between operator new
and the new operator that is the crux of Item 8. Even after reading his letter, I didn't reallyunderstand the distinction, but without his
initial prodding, I probably still wouldn't.
The notion of using destructors to prevent resource leaks (used in Item 9) comes from section 15.3 of Margaret A. Ellis' and Bjarne
Stroustrup's °The Annotated C++ Reference Manual (see page 285). There the technique is called resource acquisition is initialization.
Tom Cargill suggested I shift the focusof the approach from resource acquisition to resource release.
Some of my discussion in Item 11 was inspired by material in Chapter 4 of °Taligent's Guide to Designing Programs
(Addison-Wesley, 1994).
My description of over-eager memory allocation for the DynArray class in Item 18 is based on Tom Cargill's article, "A Dynamic
vector is harder than it looks," in the June 1992 °C++ Report. Amore sophisticated design for a dynamic array class can be found in
Cargill's follow-up column in the January 1994 °C++ Report.
Item 21 was inspired by Brian Kernighan's paper, "An AWK to C++ Translator," at the 1991 USENIX C++ Conference. His use of
overloaded operators (sixty-seven of them!) to handle mixed-type arithmetic operations, though designed to solve a problem unrelated
to the one Iexplore in Item 21, led me to consider multiple overloadings as a solution to the problem of temporary creation.
In Item 26, my design of a template class for counting objects is based on a posting to °comp.lang.c++ by Jamshid Afshar.
The idea of a mixin class to keep track of pointers from operator new (see Item 27) is based on a suggestion by Don Box. Steve
Clamage made the idea practical by...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • programacion C
  • Programacion c++
  • c# Programacion
  • Programacion En C#
  • Programacion en c
  • Programacion en c
  • Programacion en c++
  • Programacion c ++

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS