Cargando…

C++ coding standards : 101 rules, guidelines, and best practices /

Consistent, high-quality coding standards improve software quality, reduce time-to-market, promote teamwork, eliminate time wasted on inconsequential matters, and simplify maintenance. Now, two of the world's most respected C++ experts distill the rich collective experience of the global C++ co...

Descripción completa

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Sutter, Herb
Otros Autores: Alexandrescu, Andrei
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Boston : Addison-Wesley, 2004.
Colección:C++ in-depth series.
Temas:
Acceso en línea:Texto completo (Requiere registro previo con correo institucional)

MARC

LEADER 00000cam a2200000Ma 4500
001 OR_ocm79872333
003 OCoLC
005 20231017213018.0
006 m o d
007 cr cn|||||||||
008 040924s2004 mau ob 001 0 eng d
040 |a UAB  |b eng  |e pn  |c UAB  |d CEF  |d OCLCQ  |d MBB  |d OCLCQ  |d OCLCF  |d OCLCO  |d OCLCQ  |d VLB  |d UIU  |d IDEBK  |d OCLCQ  |d YDX  |d OCLCO  |d AU@  |d STF  |d OCLCO 
019 |a 59554102  |a 741355781  |a 1005200207 
020 |a 0321113586  |q (pbk. ;  |q alk. paper) 
020 |a 9780321113580  |q (pbk. ;  |q alk. paper) 
020 |a 9780132654418 
020 |a 0132654415 
029 1 |a HEBIS  |b 291435742 
029 1 |a AU@  |b 000067105044 
035 |a (OCoLC)79872333  |z (OCoLC)59554102  |z (OCoLC)741355781  |z (OCoLC)1005200207 
050 4 |a QA76.73.C153  |b S85 2004 
082 0 4 |a 005.13/3  |2 22 
049 |a UAMI 
100 1 |a Sutter, Herb. 
245 1 0 |a C++ coding standards :  |b 101 rules, guidelines, and best practices /  |c Herb Sutter, Andrei Alexandrescu. 
260 |a Boston :  |b Addison-Wesley,  |c 2004. 
300 |a 1 online resource. 
336 |a text  |b txt  |2 rdacontent 
337 |a computer  |b c  |2 rdamedia 
338 |a online resource  |b cr  |2 rdacarrier 
490 1 |a The C++ in-depth series 
504 |a Includes bibliographical references and index. 
588 0 |a Print version record. 
505 0 |a Cover -- Contents -- Preface -- Organizational and Policy Issues -- 0. Dont sweat the small stuff. (Or: Know what not to standardize.) -- 1. Compile cleanly at high warning levels. -- 2. Use an automated build system. -- 3. Use a version control system. -- 4. Invest in code reviews. -- Design Style -- 5. Give one entity one cohesive responsibility. -- 6. Correctness, simplicity, and clarity come first. -- 7. Know when and how to code for scalability. -- 8. Dont optimize prematurely. -- 9. Dont pessimize prematurely. -- 10. Minimize global and shared data. -- 11. Hide information. -- 12. Know when and how to code for concurrency. -- 13. Ensure resources are owned by objects. Use explicit RAII and smart pointers. -- Coding Style -- 14. Prefer compile- and link-time errors to run-time errors. -- 15. Use const proactively. -- 16. Avoid macros. -- 17. Avoid magic numbers. -- 18. Declare variables as locally as possible. -- 19. Always initialize variables. -- 20. Avoid long functions. Avoid deep nesting. -- 21. Avoid initialization dependencies across compilation units. -- 22. Minimize definitional dependencies. Avoid cyclic dependencies. -- 23. Make header files self-sufficient. -- 24. Always write internal #include guards. Never write external #include guards. -- Functions and Operators -- 25. Take parameters appropriately by value, (smart) pointer, or reference. -- 26. Preserve natural semantics for overloaded operators. -- 27. Prefer the canonical forms of arithmetic and assignment operators. -- 28. Prefer the canonical form of ++ and -- Prefer calling the prefix forms. -- 29. Consider overloading to avoid implicit type conversions. -- 30. Avoid overloading & &, '', or, (comma) -- 31. Dont write code that depends on the order of evaluation of function arguments. -- Class Design and Inheritance -- 32. Be clear what kind of class youre writing. -- 33. Prefer minimal classes to monolithic classes. -- 34. Prefer composition to inheritance. -- 35. Avoid inheriting from classes that were not designed to be base classes. -- 36. Prefer providing abstract interfaces. -- 37. Public inheritance is substitutability. Inherit, not to reuse, but to be reused. -- 38. Practice safe overriding. -- 39. Consider making virtual functions nonpublic, and public functions nonvirtual. -- 40. Avoid providing implicit conversions. -- 41. Make data members private, except in behaviorless aggregates (C-style structs). -- 42. Dont give away your internals. -- 43. Pimpl judiciously. -- 44. Prefer writing nonmember nonfriend functions. -- 45. Always provide new and delete together. -- 46. If you provide any class-specific new, provide all of the standard forms (plain, in-place, and nothrow). -- Construction, Destruction, and Copying -- 47. Define and initialize member variables in the same order. -- 48. Prefer initialization to assignment in constructors. -- 49. Avoid calling virtual functions in constructors and destructors. -- 50. Make base class destructors public and virtual, or protected and nonvirtual. -- 51. Destructors, deallocation, and swap never fail. -- 52. Copy and destroy consistently. -- 53. Explicitly enable or disable copying. -- 54. Avoid slicing. Consider Clone instead of copying in base classes. -- 55. Prefer the canonical form of assignment. -- 56. Whenever it makes sense, provide a no-fail swap (and provide it correctly). -- Namespaces and Modules -- T$29. 
520 |a Consistent, high-quality coding standards improve software quality, reduce time-to-market, promote teamwork, eliminate time wasted on inconsequential matters, and simplify maintenance. Now, two of the world's most respected C++ experts distill the rich collective experience of the global C++ community into a set of coding standards that every developer and development team can understand and use as a basis for their own coding standards. The authors cover virtually every facet of C++ programming: design and coding style, functions, operators, class design, inheritance, construction/destruction, copying, assignment, namespaces, modules, templates, genericity, exceptions, STL containers and algorithms, and more. Each standard is described concisely, with practical examples. From type definition to error handling, this book presents C++ best practices, including some that have only recently been identified and standardized-techniques you may not know even if you've used C++ for years. Along the way, you'll find answers to questions like What's worth standardizing--and what isn't? What are the best ways to code for scalability? What are the elements of a rational error handling policy? How (and why) do you avoid unnecessary initialization, cyclic, and definitional dependencies? When (and how) should you use static and dynamic polymorphism together? How do you practice "safe" overriding? When should you provide a no-fail swap? Why and how should you prevent exceptions from propagating across module boundaries? Why shouldn't you write namespace declarations or directives in a header file? Why should you use STL vector and string instead of arrays? How do you choose the right STL search or sort algorithm? What rules should you follow to ensure type-safe code? Whether you're working alone or with others, C++ Coding Standards will help you write cleaner code--and write it faster, with fewer hassles and less frustration. 
590 |a O'Reilly  |b O'Reilly Online Learning: Academic/Public Library Edition 
650 0 |a C++ (Computer program language) 
650 6 |a C++ (Langage de programmation) 
650 7 |a C++ (Computer program language)  |2 fast  |0 (OCoLC)fst00843286 
655 4 |a Electronic resource. 
700 1 |a Alexandrescu, Andrei. 
776 0 8 |i Print version:  |a Sutter, Herb.  |t C++ coding standards.  |d Boston : Addison-Wesley, 2004  |w (DLC) 2004022605 
830 0 |a C++ in-depth series. 
856 4 0 |u https://learning.oreilly.com/library/view/~/0321113586/?ar  |z Texto completo (Requiere registro previo con correo institucional) 
938 |a ProQuest MyiLibrary Digital eBook Collection  |b IDEB  |n cis23911694 
938 |a YBP Library Services  |b YANK  |n 14850784 
994 |a 92  |b IZTAP