您现在的位置: 中国教师站 >> 教师关注 >> 电脑技术 >> 编程技术 >> Delphi >> 正文

Google
NoTitle127
作者:Siny 文章来源:中国教师站cn-teacher 点击数: 更新时间:2007-4-22 16:01:12
AT&T Bell Laboratories Murray Hill, New Jersey 07974Computing Science Technical Report No. 100Why Pascal is Not My Favorite Programming LanguageBrian W. KernighanApril 2, 1981Why Pascal is Not My Favorite Programming LanguageBrian W. KernighanAT&T Bell Laboratories Murray Hill, New Jersey 07974ABSTRACTThe programming language Pascal has become the dominant language ofinstruction in computer science education.  It has also strongly influencedlan guages developed subsequently, in particular Ada.Pascal was originally intended primarily as a teaching language, but it hasbeen more and more often recommended as a language for serious programming aswell, for example, for system programming tasks and even operating systems.Pascal, at least in its standard form, is just plain not suitable for seriouspro gramming.  This paper discusses my personal discovery of some of thereasons why.April 2, 1981Why Pascal is Not My Favorite Programming LanguageBrian W. KernighanAT&T Bell Laboratories Murray Hill, New Jersey 079741.  GenesisThis paper has its origins in two events -- a spate of papers that compare Cand Pas cal 1, 2, 3, 4 and a personal attempt to rewrite Software Tools 5 inPascal.Comparing C and Pascal is rather like comparing a Learjet to a Piper Cub --one is meant for getting something done while the other is meant for learning-- so such comparisons tend to be somewhat farfetched.  But the revision ofSoftware Tools seems a more relevant comparison. The programs therein wereoriginally written in Ratfor, a ``structured'' dialect of Fortran imple mentedby a preprocessor.  Since Ratfor is really Fortran in disguise, it has few ofthe assets that Pascal brings -- data types more suited to characterprocessing, data structuring capabilities for better defining the organizationof one's data, and strong typing to enforce telling the truth about the data.It turned out to be harder than I had expected to rewrite the programs inPascal.  This paper is an attempt to distill out of the experience somelessons about Pascal's suitability for program ming (as distinguished fromlearning about programming).  It is not a comparison of Pascal with C orRatfor.The programs were first written in that dialect of Pascal supported by thePascal interpreter pi provided by the University of California at Berkeley.The language is close to the nominal standard of Jensen and Wirth, 6 with gooddiagnostics and careful run-time checking.  Since then, the programs have alsobeen run, unchanged except for new libraries of primitives, on four othersystems: an interpreter from the Free University of Amsterdam (hereinafterreferred to as VU, for Vrije Universiteit), a VAX version of the Berkeleysystem (a true compiler), a compiler purveyed by Whitesmiths, Ltd., and UCSDPascal on a Z80.  All but the last of these Pascal systems are written in C.Pascal is a much-discussed language.  A recent bibliography 7 lists 175 itemsunder the heading of ``discussion, analysis and debate.''  The most oftencited papers (well worth reading) are a strong critique by Habermann 8 and anequally strong rejoinder by Lecarme and Des jardins. 9 The paper by Boom andDeJong 10 is also good reading.  Wirth's own assessment of Pas cal is found in[11].  I have no desire or ability to summarize the literature; this paperrepresents my personal observations and most of it necessarily duplicatespoints made by others.  I have tried to organize the rest of the materialaround the issues oftypes and scope

[1] [2] [3] [4] [5] [6] [7] [8] [9] [10]  ... 下一页  >> 

相关专题:
 
 网友评论:(评论内容只代表网友观点,与本站立场无关!)
GOOGLE广告

阅读排行

| 设为首页 | 加入收藏 | 联系站长 | 友情链接 | 版权申明 |
中国教师站

中国教师站 版权所有 Copyright © 2006-2020 All Rights Reserved 站长:Sina & Siny
[备用域名:www.JXZYW.Com] 有事请留言有事请留言
【实力成就精品 诚信呵护品牌】

信息产业部备案
苏ICP备06018635号