Scott Meyers 拥有布朗大学计算机科学博士学位,是世界上最著名的C++软件开发权威之一。他的“Effective C++两卷本”(《Effective C++》和《More Effective C++》),开辟了技术图书写作的新风格。他曾担任《C++Report》杂志的专栏作家,经常为《C/C++Users Journal》和《Dr.Dobb's Journal》撰稿。
目录
· · · · · ·
AcknowledgmentsIntroductionBasics Item 1: Distinguish between pointers and references. Item 2: Prefer C++-style casts. Item 3: Never treat arrays polymorphically. Item 4: Avoid gratuitous default constructors.Operators Item 5: Be wary of user-defined conversion functions. Item 6: Distinguish between prefix and postfix forms of increment and decrement operators. Item 7: Never overload &&, II, or Item 8: Understand the differentmeanings of new and delete.Exceptions Item 9: Use destructors to prevent resource leaks. Item 10: Prevent resource leaks in constructors. Item 11: Prevent exceptions from leaving destructors. Item 12: Understand how throwing an exception differs from passing a parameter or calling a virtual function. Item 13: Catch exceptions by reference. Item 14: Use exception specifications judiciously. Item 15: Understand the costs of exception handling.Efficiency Item 16: Remember the 80-20 rule. Item 17: Consider using lazy evaluation. Item 18: Amortize the cost of expected computations. Item 19: Understand the origin of temporary objects. Item 20: Facilitate the return value optimization. Item 21: Overload to avoid implicit type conversions. Item 22: Consider using op= instead of stand-alone op. Item 23: Consider alternative libraries. Item 24: Understand the costs of virtual functions, multiple inheritance, virtual base classes, and RTrl.Techniques Item 25: Virtualizing constructors and non-member functions. Item 26: Limiting the number of objects of a class. Item 27: Requiring or prohibiting heap-based objects. Item 28: Smart pointers. Item 29: Reference counting. Item 30: Proxy classes. Item 31: Making functions virtual with respect to more than one objectMiscellany Item 32: Program in the future tense. Item 33: Make non-leaf classes abstract. Item 34: Understand how to combine C++ and C in the same program. Item 35: Familiarize yourself with the language standard.Recommended ReadingAn auto-ptr ImplementationGeneral IndexIndex of Example Classes, Functions, and Templates
AcknowledgmentsIntroductionBasics Item 1: Distinguish between pointers and references. Item 2: Prefer C++-style casts. Item 3: Never treat arrays polymorphically. Item 4: Avoid gratuitous default constructors.Operators Item 5: Be wary of user-defined conversion functions. Item 6: Distinguish between prefix and postfix forms of increment and decrement operators. Item 7: Never overload &&, II, or Item 8: Understand the differentmeanings of new and delete.Exceptions Item 9: Use destructors to prevent resource leaks. Item 10: Prevent resource leaks in constructors. Item 11: Prevent exceptions from leaving destructors. Item 12: Understand how throwing an exception differs from passing a parameter or calling a virtual function. Item 13: Catch exceptions by reference. Item 14: Use exception specifications judiciously. Item 15: Understand the costs of exception handling.Efficiency Item 16: Remember the 80-20 rule. Item 17: Consider using lazy evaluation. Item 18: Amortize the cost of expected computations. Item 19: Understand the origin of temporary objects. Item 20: Facilitate the return value optimization. Item 21: Overload to avoid implicit type conversions. Item 22: Consider using op= instead of stand-alone op. Item 23: Consider alternative libraries. Item 24: Understand the costs of virtual functions, multiple inheritance, virtual base classes, and RTrl.Techniques Item 25: Virtualizing constructors and non-member functions. Item 26: Limiting the number of objects of a class. Item 27: Requiring or prohibiting heap-based objects. Item 28: Smart pointers. Item 29: Reference counting. Item 30: Proxy classes. Item 31: Making functions virtual with respect to more than one objectMiscellany Item 32: Program in the future tense. Item 33: Make non-leaf classes abstract. Item 34: Understand how to combine C++ and C in the same program. Item 35: Familiarize yourself with the language standard.Recommended ReadingAn auto-ptr ImplementationGeneral IndexIndex of Example Classes, Functions, and Templates
· · · · · · (收起)
我刚读完 Effective C++ 后,不打算读这本 More 的。理由是想先在开发实践中贯彻一些 Effective C++ 中的最佳实践原则,在实践中消化、反馈和总结。 后来闲暇时,选择性地读了 More 的一些章节,感觉如获至宝,就有粗有细地通读下来。 对于两本书的比较,我的感觉是:Effective...
(展开)
成书是在 Effective C++ 3ed 之前,所以书的内容有一部分与 Effective C++ 3ed重复,它在书内批的 E 也是指 Effective C++ 2ed。 而且书中一些指的特性在新版的C++标准中已经实现,尤其是在C++0X11标准中。 虽然有这些不足,但一点也不失做为经典的份量。
(展开)
S. Meyers, 侯捷. More Effective C++:35个改编程与设计的有效方法. ISBN: 978-7-121-12570-6 这本书的作者就是上次介绍的 S. Meyers,这本书也就是上次介绍的 Effective C++ 的续集。其实这两本书本可以写在一起,但作者还是把他认为比较“高级”的部分独立出来写了两本书。...
(展开)
Item 24: Understand the costs of virtual functions, multiple inheritance, virtual base classes, and RTTI virtual ~C2(); // redefined function 应为: virtual ~C2(); // new virtual function Item 25: Virtualizing constructors and n...
(展开)
0 有用 curer 2012-09-23 22:27:39
这本书前前后后读了有1年吧. 当时感觉挺形而上学的.理论化太重,对我最大的价值在于,中英文对照的读,一边学习,一边记忆专业词汇: )
0 有用 陈小奈 2011-03-03 10:16:38
最好的c++书之一,值得多读,scott真牛逼
0 有用 映山红 2010-10-07 00:39:07
有吗?
1 有用 Lambda 2011-06-22 19:38:43
读起来挺有趣的,作者是个闷骚男
0 有用 龙之舞动 2010-09-30 19:15:26
wdcccccccc