作者:(美国)梅耶(Scott Meyers) 译者:侯捷 Scott Meyers,世界C 软件开发技术权威之一。他是两本畅销书Effective C 和More Effective C 的作者,以前曾经是C Report的专栏作家。他经常为C/C Users Journal和Dr. Dobb's Journal撰稿,也为全球范围内的客户做咨询活动。他也是Advisory Boards for NumeriX LLC和InfoCruiser公司的成员。他拥有Brown University的计算机科学博士学位。 侯捷,集计算机技术读物之著、泽、评于一身,足《多态与虚拟》和《STL源码剖析》的作者,《Run!Pc》杂志、《程序员》杂志的知名专栏作家,也是极其号召力的大学教师与研讨会讲师。他于1989年获得中国台湾清华大学动机系硕士学位。
【目录】:
目 录 译序(侯捷) ix 导读(Introduction) 001 基础议题(Basics) 009 条款1:仔细区别 pointers 和 references 009 Distinguish between pointers and references. 条款2:好使用 C 转型操作符 012 Prefer C -style casts. 条款3:不要以多态(polymorphically)方式处理数组 016 Never treat arrays polymorphically. 条款4:非必要不提供 default constructor 019 Avoid gratuitous default constructors. 操作符(Operators) 024 条款5:对定制的“类型转换函数”保持警觉 024 Be wary of user-defined conversion functions. 条款6:区别 increment/decrement 操作符的 前置(prefix)和后置(postfix)形式 031 Distinguish between prefix and postfix forms of increment and decrement operators. 条款7:千万不要重载&&,||和, 操作符 035 Never overload &&, ||, or ,. 条款8:了解各种不同意义的 new 和 delete 038 Understand the different meanings of new and delete
异常(Exceptions) 044 条款9:利用 destructors 避免泄漏资源 045 Use destructors to prevent resource leaks. 条款10:在 constructors 内阻止资源泄漏(resource leak) 050 Prevent resource leaks in constructors. 条款11:禁止异常(exceptions)流出 destructors 之外 058 Prevent exceptions from leaving destructors. 条款12:了解“抛出一个 exception”与“传递一个参数” 或“调用一个虚函数”之间的差异 061 Understand how throwing an exception differs from passing a parameter or calling a virtual function. 条款13:以 by reference 方式捕捉 exceptions 068 Catch exceptions by reference. 条款14:明智运用 exception specifications 072 Use exception specifications judiciously. 条款15:了解异常处理(exception handling)的成本 078 Understand the costs of exception handling.
效率(Efficiency) 081 条款16:谨记 80-20 法则 082 Remember the 80-20 rule. 条款17:考虑使用 lazy evaluation(缓式评估) 085 Consider using lazy evaluation. 条款18:分期摊还预期的计算成本 093 Amortize the cost of expected computations. 条款19:了解临时对象的来源 098 Understand the origin of temporary objects. 条款20:协助完成“返回值优化(RVO)” 101 Facilitate the return value optimization. 条款21:利用重载技术(overload)避免隐式类型转换(implict type conversions)105 Overload to avoid implicit type conversions. 条款22:考虑以操作符复合形式(op=)取代其独身形式(op) 107 Consider using op= instead of stand-alone op.
条款23:考虑使用其他程序库 110 Consider alternative libraries. 条款24:了解 virtual functions、multiple inheritance、virtual base classes、 runtime type identification 的成本 113 Understand the costs of virtual functions, multiple inheritance, virtual base classes, and RTTI.
技术(Techniques, Idioms, Patterns) 123 条款25:将 constructor 和 non-member functions 虚化 123 Virtualizing constructors and non-member functions. 条款26:限制某个 class 所能产生的对象数量 130 Limiting the number of objects of a class. 条款27:要求(或禁止)对象产生于 heap 之中 145 Requiring or prohibiting heap-based objects. 条款28:Smart Pointers(智能指针) 159 条款29:Reference counting(引用计数) 183 条款30:Proxy classes(替身类、代理类) 213 条款31:让函数根据一个以上的对象类型来决定如何虚化 228 Making functions virtual with respect to more than one object. 杂项讨论(Miscellany) 252 条款32:在未来时态下发展程序 252 Program in the future tense. 条款33:将非尾端类(non-leaf classes)设计为 抽象类(abstract classes) 258 Make non-leaf classes abstract. 条款34:如何在同一个程序中结合 C 和 C 270 Understand how to combine C and C in the same program. 条款35:让自己习惯于标准 C 语言 277 Familiarize yourself with the language standard. 推荐读物 285 auto_ptr 实现代码 291 索引(一)(General Index) 295 索引(二)(Index of Example Classes,Functions,and Templtes) 313
以下为对购买帮助不大的评价