《Exceptional C++ Style》
40 New Engineering Puzzles , Programming Problems, and Solutions
3月1日收到Herb Sutter的mailing-list, 浏览之下发现Herb Sutter又有新书要出版了--《Exceptional C++ Style》,现在已到了最后结集和制作索引的阶段,内容已完成了,另外当然还有一个复审(review)的阶段拉。Herb在他的网页上说到2004年晚春大概可以出版了,不过他好象说这本书暂时不能预订,他会在他的mailing list(邮件列表)中通知的。
此书继续关注于有关C++的泛型编程(Generic Programming),C++标准程序库,以及异常安全性(exception safety), 类之设计(class design), 内存和资源管理(memory and resource management), 优化和效率(optimization and efficiency)等内容。最后再以三个案例研究分析现实中的代码,实作如何把它们做到真正的Exceptional C++!
以下是他的内容条目:
// 以下翻译只是个人感觉,欢迎批评!
Generic Programming and the C++ Standard Library
Item 1: Uses and Abuses of Vector
条款1:运用Vector的好坏
我看过他的guru of week中有关的文章,Herb在运用Vector上挖的很深,这条款在Scott Meyer的《Effective STL》中也涉及到了。不知到Herb又有什么新发现了?!
Item 2: The String Formatters of Manor Farm, Part 1: sprintf
条款2:封建庄园中的String的格式化,第一部分:sprintf
不知道Herb又要枪毙谁了,sprintf我的运用经验少,不说。
Item 3: The String Formatters of Manor Farm, Part 2: Standard (or Blindingly Elegant) Alternatives
条款3:封建庄园中的String的格式化,第二部分:标准(或者缺乏判断力之优雅)的选择
同上,不说。
Item 4: Standard Library Member Functions
条款4:标准程序库之成员函数
我天天用,有什么不妥吗?好想看看Herb怎么说。
Item 5: Flavors of Genericity, Part 1: Covering the Basis [sic]
条款5:泛型之味道,第一部分:适用基础
Item 6: Flavors of Genericity, Part 2: Generic Enough?
条款6:泛型之味道,第二部分:足够泛型了?
上面两款又是泛型,不知道Herb要讲什么?期待。。。。
Item 7: Why Not Specialize Function Templates?
条款7:为什么不特化函数模板?
Item 8: Befriending Templates
条款8:善待模板
最近在看《C++ Template》,想看看Herb的高见,急啊。。。
Item 9: Export Restrictions, Part 1: Fundamentals
Item 10: Export Restrictions, Part 2: Interactions, Usability Issues, and Guidelines
Exception Safety Issues and Techniques
Item 11: Try and Catch Me
Item 12: Exception Safety: Is It Worth It?
条款12:异常安全:它值得吗?
Herb 是个中高手,要听听他的告戒!
Item 13: A Pragmatic Look at Exception Specifications
Class Design, Inheritance, and Polymorphism
Item 14: Order, Order!
Item 15: Uses and Abuses of Access Rights
条款15:访问限定之运用好坏
恩。。。洗耳恭听之。。。。。。。。
Item 16: (Mostly) Private
Item 17: Encapsulation
Item 18: Virtuality
Item 19: Enforcing Rules for Derived Classes
Memory and Resource Management
Item 20: Containers In Memory, Part 1: Levels of Memory Management
Item 21: Containers In Memory, Part 2: How Big Is It Really?
Item 22: To New, Perchance To Throw, Part 1: The Many Faces of New
Item 23: To New, Perchance To Throw, Part 2: Pragmatic Issues in Memory Management
在内存管理上,看来Herb 又有新发现了!
Optimization and Efficiency
Item 24: Constant Optimization?
Item 25: Inline Redux
Item 26: Data Formats and Efficiency, Part 1: When Compression is the Name of the Game
Item 27: Data Formats and Efficiency, Part 2: (Even Less) Bit-Twiddling
看过Herb发表在C/C++ User Journal上的《Inline Redux》这篇文章,学习中。。。。。。
Traps, Pitfalls, and Puzzlers
Item 28: Keywords That Aren’t (or, Comments By Another Name)
Item 29: Is It Initialization?
Item 30: Double or Nothing
Item 31: Amok Code
Item 32: Slight Typos? Graphic Language and Other Curiosities
Item 33: Operators, Operators Everywhere
Style Case Studies
Item 34: Index Tables
Item 35: Generic Callbacks
Item 36: Construction Unions
Item 37: Monoliths “Unstrung,” Part 1: A Look at std::string
Item 38: Monoliths “Unstrung,” Part 2: Refactoring std::string
Item 39: Monoliths “Unstrung,” Part 3: std::string Diminishing
Item 40: Monoliths “Unstrung,” Part 4: std::string Redux
我最期待的部分就是它了--Item34到Item40,希望Herb能快点完成该书啊!
此书是Herb的网路专栏Guru Of Week的总结和提炼,扩充后的心血!
愿早日见到它,希望能有影印版!
本文地址:http://com.8s8s.com/it/it28965.htm