本书为全英文版,曾荣获2005年Jolt生产效率大奖。在本书中,两位知名的C++专家将全球C++团体的集体智慧和经验凝结成一套编程规范。这些规范可以作为每一个开发团队制定实际开发规范的基础,更是每一位C++程序员应该遵循的行事准则。书中对每一条规范都给出了精确的描述,并辅以实例说明;从类型定义到差错处理,都给出了最佳的C++实践。即使使用C++多年的程序员也会从中受益匪浅。可适合于各层次C++程序员,也可作为高等院校C++课程的教学参考书。
网站首页 软件下载 游戏下载 翻译软件 电子书下载 电影下载 电视剧下载 教程攻略
书名 | C++编程规范(英文版)/图灵原版计算机科学系列 |
分类 | |
作者 | (美)萨特//亚历山德莱斯库 |
出版社 | 人民邮电出版社 |
下载 | ![]() |
简介 | 编辑推荐 本书为全英文版,曾荣获2005年Jolt生产效率大奖。在本书中,两位知名的C++专家将全球C++团体的集体智慧和经验凝结成一套编程规范。这些规范可以作为每一个开发团队制定实际开发规范的基础,更是每一位C++程序员应该遵循的行事准则。书中对每一条规范都给出了精确的描述,并辅以实例说明;从类型定义到差错处理,都给出了最佳的C++实践。即使使用C++多年的程序员也会从中受益匪浅。可适合于各层次C++程序员,也可作为高等院校C++课程的教学参考书。 内容推荐 良好的编程规范可以改善软件质量,缩短上市时间,提升团队效率,简化维护工作。在本书中,两位全世界最受尊敬的C++专家将全球C++社区的集体智慧和经验凝结成一整套编程规范。这些规范可以作为每一个开发团队制定实际开发规范的基础,更是每一位C++程序员应该遵循的行事准则。 本书实际上涵盖了C++程序设计的每一个方面,包括:设计和编码风格、函数、操作符、类的设计、继承、构造与析构、赋值、名字空间、模块、模板、泛型、异常、STL容器和算法等等。书中对每一条规范都给出了言简意赅的叙述,并辅以实例说明;书中还给出了从类型定义到错误处理等方面的大量C++最佳实践,包括许多最新总结和标准化的技术,即使使用C++多年的程序员也会从中受益匪浅。 目录 Organizational and Policy Issues 0. Don"t 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. Don"t optimize prematurely. 9. Don"t 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. Avo{d macros 17. Avoidmagicnumbers. 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 intemal#include guards. Never write external#include guards. Functions and 0perators 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&&,ll,or,(comma). 31. Don"t write code that depends on the Order of evaluation of function arguments. …… |
随便看 |
|
霍普软件下载网电子书栏目提供海量电子书在线免费阅读及下载。