博客首页
注册
建议与交流
排行榜
加入友情链接
推荐
投诉
搜索:
帮助
秋风胡杨居
风中的胡杨林
huydon.cublog.cn
管理博客
发表文章
留言
收藏夹
· 资料收集
博客圈
音乐
相册
· 生活留影
文章
· 心情日志
· ORACLE EBS 学习笔记
· 技术心得
· 时事指点
· 胡侃杂谈
首页
关于作者
姓名:秋风胡杨 职业:软件开发 年龄:22 位置: 个性介绍:喜欢所有简单自然的美好事物,就像伫立在秋风里的胡杨林,淡泊飘然,坚定而执着,自得并快活地享受风沙,扎根土壤,拥抱天空。
||
<<
>>
||
我的分类
文章列表 -
Oracle Form中调用并发请求生成报表并输出为PDF的方法。
Form 中调用并发请求生成报表并输出PDF的方法。<br>要完成这个目的,首先要在ebs中注册报表,并注册模板。<br>然后再方法里先调用FND_REQUEST.ADD_LAYOUT添加模板,然后调用FND_REQUEST.SUBMIT_REQUEST提交并发请求,……
查看全文
发表于:2008-05-13 ┆
阅读(276)
┆
评论(0)
ASP.NET2.0导出页面对象到WORD,EXCEL等文件
<div> 这段时间在做一个.NET的网站,收获良多,其中大多来自网友们的原创,学习之余,汗颜发点小心得与各位探讨.</div> <div>由于做的项目很多地方要求将一些页面导出为WORD,或者EXCEL文件.于是网上找了很多方……
查看全文
发表于:2007-12-08 ┆
阅读(512)
┆
评论(0)
当我老去.......
<div> <p>当我老了<br>当我老了,不再是原来的我。<br>请理解我,对我有一点耐心。<br>当我把菜汤洒到自己的衣服上时,当我忘记怎样系鞋带时,<br>请想一想当初我是如何手把手地教你。<br>当我一遍又一遍地重复你早已听腻的话语,<br>请耐心地听我说,不要打断我。<br>你小的时候,我不得不重复那个讲过千百遍的故事,直到你进入梦乡。<br>当我需要你帮我洗澡时,<br>请不要责备我。<br>还记得小时候我千方百计哄你洗澡的情形吗?<br>当我对新科技和新事物不知所措时,<br>请不要嘲笑我。<br>想一想当初我怎样耐心地回答你的每一个「为什么」。<br>当我由于双腿疲劳而无法行走时,<br>请伸出你年轻有力的手搀扶我。<br>就像你小时候学习走路时,我扶你那样。<br>当我忽然忘记我们谈话的主题,<br>请给我一些时间让我回想。<br>其实对我来说,谈论什么并不重要,只要你能在一旁听我说,我就很满足。</p> <p>当你看着老去的我,请不要悲伤。<br>理解我,支持我,就像你刚才开始学习如何生活时我对你那样。<br>当初我引导你走上人生路,如今请陪伴我走完最后的路。<br>给我你的爱和耐心,我会抱以感激的微笑,这微笑中凝结着我对你无限的爱。</p> <p>附注--摘自网络<br></p></div> <script type="text/javascript"><!-- google_ad_client = "pub-0384445972588843"; google_ad_width = 728; google_ad_height = 90; google_ad_format = "728x90_as"; google_ad_type = "text_image"; //2007-04-28: 签名 google_ad_channel = "5916750376"; //--> </script> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"> </script> <div> <table bgcolor="#ffffff" border="0"> <tbody> <tr> <td> <div><!-- SiteSearch --> <form action="http://www.google.com/custom" method="get" target="_top"> <table bgcolor="#ffffff" border="0"> <tbody> <tr> <td align="left" height="32" nowrap="nowrap" valign="top"><a href="http://www.google.com/"><img alt="Google" src="http://www.google.com/logos/Logo_25wht.gif" align="middle" border="0"></a> </td> <td nowrap="nowrap"><input value="unix" name="domains" type="hidden"> <label style="display: none;" for="sbi">输入您的搜索字词</label> <input id="sbi" maxlength="255" size="31" name="q"> <label style="display: none;" for="sbb">提交搜索表单</label> <input id="sbb" size="32" value="GOOGLE搜索" name="sa" type="submit"> </td></tr> <tr> <td> </td> <td nowrap="nowrap"> <table> <tbody> <tr> <td><input id="ss0" checked="checked" value="" name="sitesearch" type="radio"> <label title="搜索网络" for="ss0"><font color="#000000" size="-1">Web</font></label></td> <td><input id="ss1" value="您的域名" name="sitesearch" type="radio"> <label title="搜索 您的域名" for="ss1"><font color="#000000" size="-1">您的域名</font></label></td></tr></tbody></table><input value="pub-0384445972588843" name="client" type="hidden"> <input value="1" name="forid" type="hidden"> <input value="ISO-8859-1" name="ie" type="hidden"> <input value="ISO-8859-1" name="oe" type="hidden"> <input value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1" name="cof" type="hidden"> <input value="zh_CN" name="hl" type="hidden"> </td></tr></tbody></table></form><!-- end SiteSearch --></div></td> <td> <div><!--adsense--> <script type="text/javascript"><!-- google_ad_client = "pub-0384445972588843"; google_ad_width = 180; google_ad_height = 60; google_ad_format = "180x60_as_rimg"; google_cpa_choice = "CAAQqfyujAIaCJAoa_x-YQcBKO3M93MwAA"; google_ad_channel = ""; //--> </script> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"> </script> <!--end adsense--></div></td> <td> <div><!--firefox 2 --> <script type="text/javascript"><!-- google_ad_client = "pub-0384445972588843"; google_ad_width = 180; google_ad_height = 60; google_ad_format = "180x60_as_rimg"; google_cpa_choice = "CAAQ0cX8zwEaCEej0uUJfDpNKPu_93MwAA"; google_ad_channel = ""; //--> </script> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"> </script> <script type="text/javascript">var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));</script><script type="text/javascript">var pageTracker = _gat._getTracker("UA-3938480-1");pageTracker._initData();pageTracker._trackPageview();</script><!--end firefox 2 --></div></td></tr></tbody></table></div>
查看全文
发表于:2007-04-29 ┆
阅读(323)
┆
评论(0)
Freebsd6.0架设管理与应用CHM格式电子书
<div> <table id="AutoNumber1" style="border-collapse: collapse;" border="0" bordercolor="#111111" cellpadding="0" cellspacing="0" width="500"> <tbody> <tr> <td colspan="2" width="100%"> <p align="center"><tt class="chtitle1"><font face="新宋体"> 一本不错的FREEBSD入门教程,下面是书介绍,相信了解的朋友都知道这本书,不过她的官方网站只提供了HTML的文档下载,网上也只有在线阅读,不是很方便,于是我用官方的HTML文档做成了CHM格式的电子书,这里共享给大家</font></tt></p> <p align="center……
查看全文
发表于:2007-04-28 ┆
阅读(435)
┆
评论(0)
用 NETGRAPH 构建 ether 网桥
<DIV> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD width="100%"><SPAN class=postdetails></SPAN></TD> <TD vAlign=top noWrap><A href="http://www.freebsdchina.org/forum/posting.php?mode=quote&p=184649"></A> </TD></TR> <TR> <TD colSpan=2> <HR> </TD></TR> <TR> <TD colSpan=2><SPAN class=postbody>在 FreeBSD 中除了用 bridge 和 if_bridge 构建网桥外,还可以用 NETGRAPH 的 ng_ether 和 ng_bridge 构建网桥。 <BR>用这个方法将几块网卡构建的网桥,在外部看上去就像一……
查看全文
发表于:2007-04-27 ┆
阅读(394)
┆
评论(0)
PC-BSD Redistribution Agreement with Adobe systems
<DIV><U><FONT color=#3300ff></FONT></U></DIV> <DIV><FONT color=#000000></FONT> </DIV> <DIV><U><FONT color=#3300ff> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD align=middle> <H2>PC-BSD Announces Redistribution Agreement with Adobe Systems</H2></TD></TR> <TR> <TD align=left> <BLOCKQUOTE><BR><BR> </BLOCKQUOTE></TD></TR> <TR> <TD align=left>iXsystems announced an agreement with Adobe Systems that will allow the next version of PC-BSD to have a Fla……
查看全文
发表于:2007-04-27 ┆
阅读(323)
┆
评论(0)
C++的未来之路:C++0x概览(2)
<DIV> <DIV id=contitle> <H1>C++的未来之路:C++0x概览<二></H1></DIV> <DIV id=conauthor><SPAN>2006-05-08 08:13 </SPAN><SPAN>作者: 荣耀/李建忠 译 </SPAN><SPAN>出处: BLOG </SPAN><SPAN>责任编辑:<A title=向本编辑提问 href="http://comments.yesky.com/t/%B7%BD%D6%DB/6,324/2389650.shtml" target=_blank><FONT color=#0000ff>方舟</FONT></A> </SPAN></DIV> <DIV class=topadbg><SPAN id=ad9> <DIV id=ad9ad></DIV></SPAN></DIV> <DIV id=conneirong><SPAN id=ad3></SPAN> <DIV class=guanggao><SPAN id=conte……
查看全文
发表于:2007-04-14 ┆
阅读(345)
┆
评论(0)
C++的未来之路:C++0x概览(1)
<DIV> <DIV id=contitle> <H1>C++的未来之路:C++0x概览:<一></H1></DIV> <DIV id=conauthor><SPAN>2006-05-08 08:13 </SPAN><SPAN>作者: 荣耀/李建忠 译 </SPAN><SPAN>出处: BLOG </SPAN><SPAN>责任编辑:<A title=向本编辑提问 href="http://comments.yesky.com/t/%B7%BD%D6%DB/6,324/2389650.shtml" target=_blank><FONT color=#0000ff>方舟</FONT></A> </SPAN></DIV> <DIV class=topadbg><SPAN id=ad9> <DIV id=ad9ad></DIV></SPAN></DIV> <DIV id=conneirong><SPAN id=ad3></SPAN> <DIV class=guanggao><SPAN id=cont……
查看全文
发表于:2007-04-14 ┆
阅读(338)
┆
评论(0)
黑客工具CC攻击的思路及防范方法
<DIV> <DIV id=contitle> <H1>黑客工具CC攻击的思路及防范方法</H1></DIV> <DIV id=conauthor><SPAN>2006-01-18 11:13 </SPAN><SPAN>作者: kiki </SPAN><SPAN>出处: 华夏黑客同盟 </SPAN></DIV> <DIV id=conneirong> <P><FONT face=Verdana> <STRONG>前置知识:ASP基本阅读能力</STRONG> </FONT></P> <P><FONT face=Verdana> 蝴蝶:前段时间<A class=bluekey href="http://sh.yesky.com/" target=_blank><FONT color=#0000ff>上海</FONT></A>一家游戏娱乐公司的网站遭到了基于页面请求的DDOS分布式拒绝服务攻击,网站陷入完全……
查看全文
发表于:2007-04-12 ┆
阅读(328)
┆
评论(0)
15所名校计算机专业之特色分析
<DIV>作者:◎ 清华大学 倪铭辰<BR> <P> 随着IT时代的到来,几乎所有院校都开设了计算机系。计算机专业领域很多,虽然对于本科生来说,基本上是宽领域的全面培养,但是由于有各个学校的特色存在,同学们往往会在强势领域有更多的收获。 <BR><BR> 清华大学:在拥有多位院士的清华大学差不多在所有方向都有相应的强人撑着,相比之下,应用和系统结构更强些,某些方向已经处于世界领先水平。优势领域包括多媒体、网络技术等。同时拥有模式识别与智能控制国家重点学科。<BR><BR> ……
查看全文
发表于:2007-03-30 ┆
阅读(408)
┆
评论(0)
【Scott Meyers】C++5×5断想之一:C++历史上最重要的图书
<div> <div class="postTitle"><a href="http://blog.csdn.net/lxpbuaa/archive/2006/11/09/1375988.aspx"><font color="#810081" size="4">【Scott Meyers】C++5×5断想之一:C++历史上最重要的图书</font></a> </div> <div class="postText"> <p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 24pt; line-height: 150%;"><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">原文地址:<a href="http://www.artima.com/cppsource/top_cpp_books.html"><font color="#0000ff">http://www.artima.com/cppsource/top_cpp_books.html</font></a>。译文发表于《程序员》2006.11。</font></span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 24pt; line-height: 150%;"><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman"></font></span></p><span style="font-size: 12pt;" lang="EN-US"> <h1 style="margin: 17pt 0cm 16.5pt;"><span style="font-family: 宋体;"><font size="4">作者介绍</font></span></h1> <p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 24pt; line-height: 150%;"><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman"><img style="width: 101px; height: 140px;" alt="" src="http://www.artima.com/cppsource/images/scottMeyers.jpg" align="left" height="110" width="100">Scott Meyers</font></span><span style="font-size: 12pt; font-family: 宋体;">,</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">顶级权威之一,为世界各地客户提供培训和咨询服务。出版有畅销的</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">Effective C++</font></span><span style="font-size: 12pt; font-family: 宋体;">系列图书(《</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">Effective C++</font></span><span style="font-size: 12pt; font-family: 宋体;">》、《</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">More Effective C++</font></span><span style="font-size: 12pt; font-family: 宋体;">》和《</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">Effective STL</font></span><span style="font-size: 12pt; font-family: 宋体;">》),设计了创新型的</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">Effective C++ CD</font></span><span style="font-size: 12pt; font-family: 宋体;">,</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">Addison Wesley</font></span><span style="font-size: 12pt; font-family: 宋体;">的</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">Effective Software Development Series</font></span><span style="font-size: 12pt; font-family: 宋体;">顾问编辑,</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">The C++ Source (http://www.artima.com/cppsource/)</font></span><span style="font-size: 12pt; font-family: 宋体;">咨询板块专家。布朗大学计算机科学博士,他的网站是</span><span style="font-size: 12pt;" lang="EN-US"><font color="#0000ff" face="Times New Roman"><a href="http://www.aristeia.com/">www.aristeia.com</a></font></span><span style="font-size: 12pt; font-family: 宋体;">。</span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 24pt; line-height: 150%;"><span style="font-size: 12pt; font-family: 宋体;"><font face="宋体, MS Song"></font></span> </p></span> <p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 24pt; line-height: 150%;"><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman"> </font></span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 24pt; line-height: 150%;"><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">1991</font></span><span style="font-size: 12pt; font-family: 宋体;">年,我写作了《</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">Effective C++</font></span><span style="font-size: 12pt; font-family: 宋体;">》。在此之前,我已学习</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">多年。坐下来撰写本文的同时,我相信我的</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">学习历程始于</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">1986</font></span><span style="font-size: 12pt; font-family: 宋体;">年,现在是</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">2006</font></span><span style="font-size: 12pt; font-family: 宋体;">,正好是我学习</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++20</font></span><span style="font-size: 12pt; font-family: 宋体;">周年和写作第一本</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">图书</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">15</font></span><span style="font-size: 12pt; font-family: 宋体;">周年纪念。不过,记忆里——至少在我的记忆里——不敢保证,似乎有历史记录证明过我实际于</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">1988</font></span><span style="font-size: 12pt; font-family: 宋体;">年开始接触</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">。如果是这样的话,那么现在应该是我与</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">的</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">19</font></span><span style="font-size: 12pt; font-family: 宋体;">周年纪念年。虽然这个数字比不得</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">20</font></span><span style="font-size: 12pt; font-family: 宋体;">那么完整,但仍然说明</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">于我已是多年老友。今年里,无论作何考虑,我都觉得我不应该关注</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">的未来,而是回想它的过去。目前,</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">的未来是热门话题,比如备受关注的下一个版本语言规范(</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++0x</font></span><span style="font-size: 12pt; font-family: 宋体;">),临近最后定稿阶段,首版技术报告已经出炉,二版也正蓄势待发。但我现在想驻足过去,做点与众不同的事:分门别类评选</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">历史上最重要的贡献。</span><span style="font-size: 12pt;" lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 24pt; line-height: 150%;"><span style="font-size: 12pt; font-family: 宋体;">首先要公布的是最重要的五本</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">图书。公布之前,我想先罗嗦几句。这些</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">领域最重要贡献是在我个人阅历和准则基础上评选的,是我的主观看法,这点自不待言。而不得不说的恰恰是我个人的阅历和评选准则。</span><span style="font-size: 12pt;" lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 24pt; line-height: 150%;"><span style="font-size: 12pt; font-family: 宋体;">你们很多人不得不承认:过去</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">20</font></span><span style="font-size: 12pt; font-family: 宋体;">年里,我从未开发过商业软件,更遑论用</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">写这类程序。不,不光过去,将来我也不会。因此,我不但不是真正的</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">开发人员,更说不上是</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">崇拜者。如果一定要扯点关系的话,那就是我在</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">1985</font></span><span style="font-size: 12pt; font-family: 宋体;">-</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">1993</font></span><span style="font-size: 12pt; font-family: 宋体;">年上大学时,用</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">写过一个研究用软件,很小,就几千行代码,我一个人开发,它很快就成了历史的尘埃。自从我十余年前专心作咨询师以来,我的</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">编程仅限于玩乐,比如“让我们看看它如何工作”(有时候也“让我们看看它能让多少编译器崩溃”),通常,都是一个文件就可以容纳的程序。</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">make</font></span><span style="font-size: 12pt; font-family: 宋体;">?谁需要讨厌的</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">make</font></span><span style="font-size: 12pt; font-family: 宋体;">?我以</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">为生,但不是写</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">程序。</span><span style="font-size: 12pt;" lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 24pt; line-height: 150%;"><span style="font-size: 12pt; font-family: 宋体;">和语言标准化亲密接触,于我的生活也没多大干系,因为我从未成为</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">标准委员会成员,未被列入委员会的邮件名单,也从来没有参加过任何标准工作会议。我对委员会内部工作的了解——包括对语言有重大影响的工作——都靠阅读他人的文章,或者从他们那听说。因此我对像我们知道的那样推动了</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">发展的那些重大努力知之甚少,可能只有委员会内部的同志对这些努力感受最深。</span><span style="font-size: 12pt;" lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 24pt; line-height: 150%;"><span style="font-size: 12pt; font-family: 宋体;">上面说了,我既不用</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">写软件,也没为语言规范贡献力量,那我到底在干嘛呢?你可能满怀疑窦。基本上可以这么讲,我就研究</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">本身以及它的应用。尽我所能,通过图书、杂志、新闻组、邮件以及和开发者、标准化委员会成员面对面交流,加上我自己写程序做实验玩儿等,我收集了大量有关</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">的资料,然后对它们做整理、分析,最后集中打包(如写书、在杂志上发表文章、作技术报告等)提供给真正使用这门语言的朋友们,比如你。你们的工作是使用</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">这个工具,开发有用的软件;我的工作是搜集、整理能帮助你们更好使用这个工具的资料。</span><span style="font-size: 12pt;" lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 24pt; line-height: 150%;"><span style="font-size: 12pt; font-family: 宋体;">我希望将自己定位为局外观察员,既不像程序员那样日复一日辛苦劳作,也不愿为标准化工作的纷繁琐事殚精竭思,但我要对二者都保持熟悉。这一系列的文章,就是我这个自封的局外观察员对</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">历史上最重大贡献的总结。</span><span style="font-size: 12pt;" lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 24pt; line-height: 150%;"><span style="font-size: 12pt; font-family: 宋体;">所谓“最重大”,我指的是这些贡献对</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">开发人员产生了最重大的影响。我的名单上所列项,很多都发挥了直接性的影响,我们也直接感觉到了。比如广泛使用的编译器、库和读者众多的图书与文章,它们的影响力非常直接。另外一些的影响则是间接的——我是说它们首先对中间渠道产生直接或间接的影响,然后由中间渠道直接影响我们(哈,绕口令,惹你讨厌了吧?)——比如你稍后会看到的、被我列为最重要图书之一的《</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">ISO C++ Standard</font></span><span style="font-size: 12pt; font-family: 宋体;">》,对于开发人员,它的影响是间接的,但对编译和库编写者的影响却是直接的。</span><span style="font-size: 12pt;" lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 24pt; line-height: 150%;"><span style="font-size: 12pt; font-family: 宋体;">有些贡献的重要性非常明显,比如和标准有关的。其他的,通常则需要时间老人来验证它们的影响力。因此,在</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">圈子里出现相对较晚的,与已经存在较长时间的相比,更不容易列入我的名单。比如我的图书名单里,最晚的只到</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">2001</font></span><span style="font-size: 12pt; font-family: 宋体;">年。这倒不是说在过去五年里出版的图书就没有价值,而是说,以我来看,这些图书还没有表现出我名单上所列图书更大的重要性。如果过些年再来问我,或许就会有所变动了。</span><span style="font-size: 12pt;" lang="EN-US"><o:p></o:p></span></p> <h1 style="margin: 17pt 0cm 16.5pt;"><span style="font-family: 宋体;">五本最重要的</span><span lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-family: 宋体;">图书</span><span style="font-size: 12pt;" lang="EN-US"><o:p></o:p></span></h1> <p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 24pt; line-height: 150%;"><span style="font-size: 12pt; font-family: 宋体;">为了让这个名单(也包括后续文章中提到的其他名单)更有价值,我给自己定了两条原则。第一,只挑五本。哪怕多一本,让它共享这份荣誉的位子也没有,也没有为那些差不多靠边者准备优秀奖。五个位子,五本书。第二,我没有将自己的书排除在竞争行列之外。如果我要评判别人的书,当然也不能放过自己的。</span><span style="font-size: 12pt;"><font face="Times New Roman"> <span lang="EN-US"><o:p></o:p></span></font></span></p> <p class="MsoBodyTextIndent" style="margin: 0cm 0cm 0pt;"><span style="font-size: 12pt; font-family: 宋体;"> 这两个原则已经相当公平而严格了,因此我在其他方面就可以偷点懒:我不打算对名单上的图书按重要性从高到低排座次(其他几个名单也一样)。我的评判粒度是“在名单上”和“不在名单上”。每个名单里,我都以年代为序,本文的单子里,自然就是出版日期。</span></p> <p class="MsoBodyTextIndent" style="margin: 0cm 0cm 0pt;"><span style="font-size: 12pt; font-family: 宋体;"> 言归正传,下面揭晓我评选的过去出版的最重要的五本</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">图书:</span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 24.1pt; line-height: 150%;"><strong><span style="font-size: 12pt; font-family: 宋体;">《</span></strong><strong><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">The C++ Programming Language</font></span></strong><strong><span style="font-size: 12pt; font-family: 宋体;">》</span></strong><span style="font-size: 12pt; font-family: 宋体;">,作者</span><strong><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">Bjarne Stroustrup</font></span></strong><span style="font-size: 12pt; font-family: 宋体;">,</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">Addison-Wesley</font></span><span style="font-size: 12pt; font-family: 宋体;">出版社。</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">1986</font></span><span style="font-size: 12pt; font-family: 宋体;">年首版,</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">1991</font></span><span style="font-size: 12pt; font-family: 宋体;">年再版,</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">1997</font></span><span style="font-size: 12pt; font-family: 宋体;">年第三版,</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">2000</font></span><span style="font-size: 12pt; font-family: 宋体;">年特别版。对于</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">老人们来说,此书的首版是打开知识大门的钥匙。目前的版本已经膨胀到千页以上,增加了很多那时候还不存在的特性,如模板、异常、多继承等,不过未提及标准模板库;显然首版——也是我逐页阅读过的唯一版本——更易驯服,只有</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">328</font></span><span style="font-size: 12pt; font-family: 宋体;">页。身处</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">80</font></span><span style="font-size: 12pt; font-family: 宋体;">年代后半页的</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">程序员,对这本书的完全旅行是必不可少的,它对早期的</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">从业者和追梦人的重要影响,怎么评价都不过分。即使介绍</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">的图书满天飞的现在,我仍然推荐专业开发人员阅读这本书(当前版本),因为我认为无论就</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">本身,还是如何用好</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">来说,它都是最全面的参考书。</span><span style="font-size: 12pt;" lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 24pt; line-height: 150%;"><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">Stroustrup</font></span><span style="font-size: 12pt; font-family: 宋体;">因为吝于词句的写作风格而遭诟病,大家都知道我说过,如果阅读</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">TC++PL</font></span><span style="font-size: 12pt; font-family: 宋体;">(译者注:即</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">The C++ Programming Language</font></span><span style="font-size: 12pt; font-family: 宋体;">的简称。此书行文简洁)时,你无意忽略了哪怕一个句子,就有可能丢掉了很重要的东西(再想想目前版本千页以上的篇幅,你就能明白我为什么说它是最全面的参考书了)。然而,精炼恰是这本书无与伦比的魅力之一。比如,首版中对自赋值处理方法的说明,就再好不过证明了这一点:</span><span style="font-size: 12pt;" lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 24pt; line-height: 150%;"><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">if (this == &a) return;<span style=""> </span><span style=""> </span><span style=""> </span>// beware of s=s;<o:p></o:p></font></span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 24pt; line-height: 150%;"><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman"> <o:p></o:p></font></span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 24pt; line-height: 150%;"><span style="font-size: 12pt; font-family: 宋体;">首版《</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">Effective C++</font></span><span style="font-size: 12pt; font-family: 宋体;">》里,我在同样问题上花费了了五页半的篇幅。你不得不为这样一本半行注释就解决问题的图书倾倒。</span><span style="font-size: 12pt;" lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 24.1pt; line-height: 150%;"><strong><span style="font-size: 12pt; font-family: 宋体;">《</span></strong><strong><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">Effective C++</font></span></strong><strong><span style="font-size: 12pt; font-family: 宋体;">》,</span></strong><span style="font-size: 12pt; font-family: 宋体;">作者</span><strong><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">Scott Meyers</font></span></strong><span style="font-size: 12pt; font-family: 宋体;">,</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">Addison-Wesley</font></span><span style="font-size: 12pt; font-family: 宋体;">出版社。</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">1992</font></span><span style="font-size: 12pt; font-family: 宋体;">年首版,</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">1998</font></span><span style="font-size: 12pt; font-family: 宋体;">年再版,</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">2005</font></span><span style="font-size: 12pt; font-family: 宋体;">年第三版。它是超级天才的杰作!哦,不要吐,别在意。</span><span style="font-size: 12pt;" lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 24pt; line-height: 150%;"><span style="font-size: 12pt; font-family: 宋体;">我和此书都很幸运,它生逢其时。</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">1991</font></span><span style="font-size: 12pt; font-family: 宋体;">年前后,大部分程序员已经掌握了语言基础,能做到根据需求编写</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">程序,但同时总觉得自己无法避免看似可以避免的诸多问题。这是业界第一本专注于如何深入使用</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">,全力帮助开发者解决常见问题,最好地使用非</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C</font></span><span style="font-size: 12pt; font-family: 宋体;">特性(如构造器、析构器、继承、虚函数和类内存分配器等)的图书。在这本书里,一反常态,不像当时大多数人将重点放在讨论</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">的灵活性上,我采用了一种很特别的指导式思路来写作。以我的经验判断,我认为程序员渴望找到强能有力的办法来控制</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">C++</font></span><span style="font-size: 12pt; font-family: 宋体;">的灵活多变,因此我要告诉他们究竟该做什么。这本书做到了。“一定要这么做”,“千万不要那样干”。一代程序员将这些原则熟记于心,也催生了不少协助性工具。比如</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">Gnu C++</font></span><span style="font-size: 12pt; font-family: 宋体;">编译器,甚至设置了《</span><span style="font-size: 12pt;" lang="EN-US"><font face="Times New Roman">Effective C++</font></span><span style="font-size: 12pt; font-family: 宋体;">》指导原则的检测警告选项</span><span style="font-size: 12pt; color: red;" lang="EN-US"><font face="Times New Roman">[</font></span><span style="font-size: 12pt; color: red; font-family: 宋体;">注</span><span style="font-size: 12pt; color: red;" lang="EN-US"><font face="Times New Roman">1]</font></span><span style="font-size: 12pt; font-family: 宋体;">。此书的一个重要特点——直到写作我的第二本书(《</span><span style="font-size: 12pt;" lang="EN-US"><fo></fo><div></div></span></p></div> <script type="text/javascript"> <!--google_ad_client = "pub-0384445972588843"; google_ad_width = 728; google_ad_height = 90; google_ad_format = "728x90_as"; google_ad_type = "text_image"; //2007-04-27: 签名google_ad_channel = "5916750376"; //--> </script> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"> </script><script type="text/javascript">var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));</script><script type="text/javascript">var pageTracker = _gat._getTracker("UA-3938480-1");pageTracker._initData();pageTracker._trackPageview();</script> </div> <div></div>
查看全文
发表于:2007-03-30 ┆
阅读(378)
┆
评论(0)
【Scott Meyers】C++5×5断想之二:C++历史上最重要的文献
<DIV> <DIV class=postTitle><A href="http://blog.csdn.net/zhouyunabc/archive/2006/12/10/1437209.aspx"><FONT color=#810081><FONT size=4>【Scott Meyers】C++5×5断想之二:C++历史上最重要的文献</FONT> </FONT></A></DIV> <DIV class=postText> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 24pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0; mso-char-indent-size: 12.0pt"><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman"><IMG style="WIDTH: 101px; HEIGHT: 140px" height=110 alt="" src="http://www.artima.com/cppsource/images/scottMeyers.jpg" width=100 align=left>Scott Meyers</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">,</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C++</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">顶级权威之一,为世界各地客户提供培训和咨询服务。出版有畅销的</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">Effective C++</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">系列图书(《</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">Effective C++</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">》、《</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">More Effective C++</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">》和《</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">Effective STL</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">》),设计了创新型的</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">Effective C++ CD</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">,</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">Addison Wesley</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">Effective Software Development Series</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">顾问编辑,</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">The C++ Source (http://www.artima.com/cppsource/)</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">咨询板块专家。布朗大学计算机科学博士,他的网站是</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman" color=#0000ff><A href="http://www.aristeia.com/">www.aristeia.com</A></FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</SPAN></P><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><FONT face="宋体, MS Song"> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 24pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0; mso-char-indent-size: 12.0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"> </SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 24pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0; mso-char-indent-size: 12.0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在本系列的<A href="http://blog.csdn.net/lxpbuaa/archive/2006/11/09/1375988.aspx"><FONT color=#0000ff>上一篇文章</FONT></A>里,我列出了我认为最重要的五本</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C++</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">图书,但大量有关</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C++</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的重要文献并非来自图书。比如期刊、杂志、网络上的文章;博士论文、会议纪要;新闻组帖子;博客;标准化文档等很多很多。它们对</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C++</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的进步与繁荣作出了巨大贡献。我没有读全,甚至谈不上读了大多数,但作为</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C++</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的长期关注者,我还是阅读了很多这类文献。在本期里,我将评选</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C++</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">历史上最重要的五部非图书类文献。和上期评选图书一样,我仍然将数量限制为五,尽管我没有写出过重要到能上这个榜的东西,但仍然将自己列入了候选队伍。以下文献按时间为序。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><?XML:NAMESPACE PREFIX = O /><O:P></O:P></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 24pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0; mso-char-indent-size: 12.0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一个让我无可回避的逻辑范畴两难问题是:如果文献</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">A</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的思想对</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C++</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">直接影响很小,但文献</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">B</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的作者读到了</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">A</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">,将这个思想引入了</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">B</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">并产生了巨大影响,那么到底哪个文献更重要,</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">A</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">(“发明者”)还是</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">B</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">(“繁荣者”)?我最终选择了</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">B</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">,并不是因为这种做法天然就正确,而是因为我不想花力气拼命追查下列文献作者的思想是否从别的文献继承而来</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: red"><FONT face="Times New Roman">[</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">注释</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: red"><FONT face="Times New Roman">1]</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。反过来,我随便翻到</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C++</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">语言规范的某页。大家知道,</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">const member functions</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">里的</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">const</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是不彻底的:指针数据成员自动变为</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">const</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">,但指针所指的数据本身不会。借鉴这个规定,我假设公布在下面的名单里的文献重要,而忽略它们引用的基础物(以及我所不知的其他文献)。当然,从</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C++</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">本身来说,这可能不是正确的做法,但易于实现,所以我也这么干了</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: red"><FONT face="Times New Roman">[</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">注释</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: red"><FONT face="Times New Roman">2]</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><O:P></O:P></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 24pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0; mso-char-indent-size: 12.0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在详细解说名单之前,我想请各位发发善心,允许我为《</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C++ Report</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">》——曾经为</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C++</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">作出了最重大贡献的期刊——说几句悼词(如果你不那么仁慈,就请直接跳过去阅读后面内容吧)。在其存在的大部分时期(</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">1989-2000</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">)里,《</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C++ Report</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">》一直是</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C++</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">推动者和鼓吹者纸张写作的乐园(在此期间,首倡电子写作的是</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">Usenet</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">新闻组</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">comp.lang.c++</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">,后来还有</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">comp.std.c++</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">comp.lang.c++.moderated</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">)。在《</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C++ Report</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">》发表文章的人里,有些名字你可能听说过(比如我上期列出的“最重要的</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C++</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">图书”的作者),更多的可能你就不知道了(譬如下面要提到的一些文献的作者,以及——算了,名单太长,简直没办法开始。我知道,如果开了头列出一些名字,那就暗示着未列出的人没列出的那么重要,这样一来我的麻烦就大了。所以干脆一个不提,但请相信我,《</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C++ Report</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">》有生之年一直相当兴盛,它吸引了这个领域最好的写作群体——都是最有兴趣,也是最有实力去写作的人)。《</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C++ Report</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">》关门的时候,很多专栏作家投向了《</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C/C++ Users Journal</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">》,但这个杂志从来没有像《</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C++ Report</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">》那样吸引过我;现在,</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">CUJ</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">也停刊了。《</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C++ Report</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">》留给像我这样整天胡说八道的老怪物们的,就只有面对时光飞逝的无奈哀叹了。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><O:P></O:P></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 24pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0; mso-char-indent-size: 12.0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">唠叨这么多,我感觉好点了,还是继续说我的最重要非图书类文献名单吧:</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><O:P></O:P></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 24pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0; mso-char-indent-size: 12.0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">《</SPAN><STRONG><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">Programming in C++, Rules and Recommendations</FONT></SPAN></STRONG><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">》,作者是</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">Ellemtel</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">电信系统实验室的</SPAN><STRONG><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">Mats Henricson</FONT></SPAN></STRONG><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</SPAN><STRONG><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">Erik Nyquist</FONT></SPAN></STRONG><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">,</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">1992</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">年。在我</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">90</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">年代早期前后的一些文章里,我提到过当时很多程序员渴求如何驾驭</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C++</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">威力方面的指导意见,他们最感兴趣的是告诉他们该做什么、不该做什么的编程引导手册。几乎在我的《</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">Effective C++</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">》尝试提供这方面指导的同时,</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">Mats Henricson</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">Erik Nyquist</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在互联网上发布了他们写的编程手册。其实在此之前,这本手册就出来一段时间了,但因为是瑞典文,所以大大限制了它的传播。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><O:P></O:P></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 24pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0; mso-char-indent-size: 12.0pt"><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">Ellemtel</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">版手册以技术性语言写成,容易阅读,因此二位作者声名远播、影响很大。不久,大家得知他们准备成书出版,此时我就有不祥预感(竞争于市场可能是件好事,但那时,我是这个市场上仅有的参与者。我真的很喜欢这本书册的风格</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: red"><FONT face="Times New Roman">[</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">注释</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: red"><FONT face="Times New Roman">3]</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">)。我们对这本书满怀期待,转眼间时间过去了几年。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">1996</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">年底,它终于面世了(《</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">Industrial Strength C++</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">》,</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">Mats Henricson</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">Erik Nyquist, Prentice Hall, 1997</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">),但那个时候,这本书的很多指导意见与同时代的编译器相比已经过时,它包含的很多信息在</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C++</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">社区里已经广为人知,与</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">4</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">年前第一次的英文版相比,人们感觉它的作用已经大打折扣。我阅读了这本书,先是兴趣满怀,然后就有点伤感,因为我感觉到花费</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">4</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">年时光从互联网文档到成书,不仅它包含的技术信息失去了当年的光芒,写作本身也丧失了原有的精神。我估计原稿已经被无数次修改,以期符合评审者在各方面的要求。这就解释了它为什么花费了如此长时间才得以出版,为什么最后的成书如此平淡。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><O:P></O:P></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 24pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0; mso-char-indent-size: 12.0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我想,作者和出版商对这本书寄予厚望,但事与愿违,不过这并不能削弱最初互联网版本的影响力。它一出来,</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C++</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">程序员就一口咬了上去。它是</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C++</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">最佳实践规范总结道路上的重要里程碑。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><O:P></O:P></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 24pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0; mso-char-indent-size: 12.0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">《</SPAN><STRONG><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">Exception Handling: A False Sense of Security</FONT></SPAN></STRONG><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">》,作者</SPAN><STRONG><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">Tom Cargill</FONT></SPAN></STRONG><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">,</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">1994</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">年发表于《</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C++ Report</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">》</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">11</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">、</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">12</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">月刊。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">1994</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">年,</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C++</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">社区矫矜之气弥漫。当时,</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C++</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是很热门的语言,工作岗位充足,很多人认为</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C++</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">无所不能。在此前几年里,这门语言里增加很多重要的特性,比如多继承、模板,以及稍晚点的异常。因为异常是新事物,《</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C++ Report</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">》上就出现了很多讨论文章,凡是</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C++</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">程序员出现的场合,大家都是三句话不离异常。很多文章反映了属于那个时代的狂热:“异常美妙之极,它们让错误处理变得简单。你需要做的所有事情就是去理解</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">try</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">、</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">throw</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">catch</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。看我编写一个堆栈类吧,告诉你们</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C++</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">有了异常处理后,将比过去酷多少。”</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman"> Tom Cargill</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的文章(是他的长期专栏</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">“C++ Gadfly”</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">——这是多年来最名副其实的专栏之一——里的一篇)拂去了我们脸上集体自满的微笑。仅仅用一句话,</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">Cargill</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">就说明了</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">try</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">、</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">throw</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">catch</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对这个问题毫无帮助:</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><O:P></O:P></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 24pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0; mso-char-indent-size: 12.0pt"><EM><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">运用异常的真正难点在于如何以如下方式编写所有介于二者(</SPAN></EM><EM><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">thow</FONT></SPAN></EM><EM><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</SPAN></EM><EM><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">catch</FONT></SPAN></EM><EM><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">)之间的代码:任何异常都能从</SPAN></EM><EM><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">throw</FONT></SPAN></EM><EM><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">处安全到达处理它的地方,且不破坏传递路线上的其他程序部分。</SPAN></EM><SPAN lang=EN-US style="FONT-SIZE: 12pt"><O:P></O:P></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 24pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0; mso-char-indent-size: 12.0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这个专栏继续剖析了《</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C++ Report</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">》上我刚才提到过的“异常美妙之极”系列专栏上的文章</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: red"><FONT face="Times New Roman">[</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">注释</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: red"><FONT face="Times New Roman">4]</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">,最后以一个擂台(</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">Cargill</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">称之为“邀请”)结束:发布一个异常安全的堆栈类。这个挑战引来了潮水般的回应,但我认为,直到</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">1997</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">年,</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">Herb Sutter</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">发表的一篇文章才算真正有分量(后面会说到这个事情)。</SPAN><SPAN style="FONT-SIZE: 12pt"><FONT face="Times New Roman"> <SPAN lang=EN-US><O:P></O:P></SPAN></FONT></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 24pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0; mso-char-indent-size: 12.0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我认为</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">Tom Cargill</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的专栏文章不仅证明了我们对于异常想法的幼稚,而且也还了</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C++</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一个清白。在我们明白如何编写异常安全的代码时,</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">Java</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这门可爱的新语言出现了(就我所知,现在是</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">Ruby on Rails</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">),曾经信誓旦旦的“我们天下第一”狂想再也没有回来过。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><O:P></O:P></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 24pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0; mso-char-indent-size: 12.0pt"><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman"> <O:P></O:P></FONT></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 24pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0; mso-char-indent-size: 12.0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">《</SPAN><STRONG><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">Curiously Recurring Template Patterns</FONT></SPAN></STRONG><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">》,</SPAN><STRONG><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">Jim Coplien</FONT></SPAN></STRONG><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">于</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">1995</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">年发表在《</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">C++ Report</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">》</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">2</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">月刊。这篇文章的意义不在于它的内容本身,而在于它给所述内容的命名。真是双重巧合啊,这篇文章来自于</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">Coplien</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的专栏“</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">The Column Without a Name</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">”,而且他给文章起的名字也已经直接成了一个模式名:</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman">The Curiously Recurring Template Pattern (CRTP)<SPAN style="COLOR: red">[</SPAN></FONT></SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">注释</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: red"><FONT face="Times New Roman">5]</FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。这个模式本身是指将派生类作为参数在它自己的模板化基类里使用:</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt"><O:P></O:P></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 24pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0; mso-char-indent-size: 12.0pt"><SPAN lang=EN-US style="FONT-SIZE: 12pt"><FONT face="Times New Roman"> <O:P></O:P></FONT></SPAN><