goto有害论
历届图灵奖得主

历届图灵奖得主图灵奖-----计算机的诺贝尔奖图灵奖得主1966年图灵奖获得者美国科学家艾伦佩利Alan J.Perlis:ALGOL语言和计算机科学的“催生者”。
获奖演说“算法系统的综合”(The Synthesis of Algorithmic System)。
1967年图灵奖获得者英国科学家莫里斯威尔克斯Maurice V.Wilkes:世界上第一台存储程序式计算机EDSAC的研制者。
获奖演说“计算机的过去和现在”(Computer Then and Now)。
1968年图灵奖获得者美国科学家理查德汉明Richard W.Hamming:发明了纠错码——汉明码(Hamming Code)。
获奖演说“对计算机科学的看法”(On Man’s View of Computer Science)。
图灵奖得主1969年图灵奖获得者美国科学家马文明斯基Marvin L.Minsky:“人工智能之父”,知识的框架理论(Frame Theory)创立者。
获奖演说“计算机科学的形式和内容” 。
1970年图灵奖获得者英国科学家詹姆斯威尔金森James H.Wilkinson:数值分析专家和研制ACE计算机(第一台商业计算机)的功臣。
获奖演说“一个数值分析家的若干意见” 。
1971年图灵奖获得者美国科学家约翰麦卡锡John MacCarthy:“人工智能之父”,LISP语言的发明者。
获奖演说“人工智能研究的现状” 。
图灵奖得主1972年图灵奖获得者荷兰科学家埃德斯加狄克斯特拉Edsgar W.Dijkstra:最早指出“goto”语句有害,著名的最短路径Dijkstra算法,现代操作系统的奠基者之一。
获奖演说“智力低下的程序员” 。
1973年图灵奖获得者美国科学家查尔斯巴赫曼Charles W.Bachman:网状数据库之父、推动与促成数据库标准的制订。
获奖演说“作为导航员的程序员” 。
1974年图灵奖获得者美国科学家唐纳德克努特Donad E.Knuth:经典巨著《计算机程序设计的艺术》The Art of Computer Programming的作者,排版软件的先驱(TEX)。
历届图灵奖获得者及其获奖原因

历届图灵奖(A.M. Turing Award)获得者及其获奖原因目前图灵奖由英特尔公司和Google公司赞助,奖金为250,000美元。
2010 Leslie Valiant 莱斯利·瓦伦特获奖原因:为人工智能进步提供了理论基础,在改进机器学习方面取得骄人成绩。
在计算科学和数学领域的远见及认知理论与其它技术结合后,开创了机器学习和通信的新时代,如IBM推出的计算系统已经能够挑战人类回答问题的能力。
2009 Charles Thacker获奖原因:对第一台现代个人计算机Xerox PARC Alto的先驱性设计与实现,还有在局域网(包括以太网)、多处理器工作站、窥探高速缓存一致性协议和平板PC等方面的重大发明和贡献。
(现代PC之父——盖茨语)2008 Barbara Liskov 利斯科夫获奖原因:在计算机程序语言设计方面的开创性工作。
她的贡献是让计算机软件更加可靠、安全和更具一致性。
2007 Edmund M. Clarke、Allen Emerson和Joseph Sifakis获奖原因:在将模型检查发展为被硬件和软件业中所广泛采纳的高效验证技术上的贡献。
而DDJ则将三人的贡献称为“在发现计算机硬件和软件中设计错误的自动化方法方面的工作”。
2006 Fran Allen获奖原因:对于优化编译器技术的理论和实践做出的先驱性贡献,这些技术为现代优化编译器和自动并行执行打下了基础。
2005 Peter Naur获奖原因:由于在设计Algol60程序设计语言上的贡献。
Algol60语言定义清晰,是许多现代程序设计语言的原型。
2004 Vinton G. Cerf、Robert E. Kahn获奖原因:由于在互联网方面开创性的工作,这包括设计和实现了互联网的基础通讯协议,TCP/IP,以及在网络方面卓越的领导。
2003 Alan Kay获奖原因:由于在面向对象语言方面原创性思想,领导了Smalltalk的开发团队,以及对PC的基础性贡献。
Goto有害论翻译

Go To Statement Considered Harmful Edsger W.Dijkstrainterpreter:sdulmz经过数年的观察我发现:编程人员的质量是其在程序中产生的go to语句密度的减函数。
最近,我发现了为什么go to语句的使用会有这样灾难性的影响,并且我坚信go to语句应该从所有的“高级”编程语言中取消。
当时我并没有十分重视这一发现;现在才考虑提交并出版是因为在最近的研究中这一问题又出现了,我不得不这样做了。
第一个备注是:尽管程序员的活动在他构造出正确的程序时就结束了,但是在程序控制下发生的过程才是其活动的真正的主题,因为是过程完实现了预期效果;同时是过程的动态行为满足了预期指标。
但是,当编写完程序后,程序相应的过程的构造往往交给机器去完成。
第二个备注是:人类智能在掌握静态关系方面变现的非常不错,人类智能在想象实时过程方面相对地发育不良。
因此,我们应该尽最大的努力缩短静态程序和动态过程的概念上的间隙,从而使程序(分散在文本空间上)和过程(分散在时间上)尽可能一致。
现在考虑一下我们是怎样描述过程的的发展的。
(你可能会用具体的方式考虑这个问题:假设一个过程(过程看成是一次连续的动作)在任意动作后停止,我们必须修正什么数据才能使过程重新进行到相同的点?)如果程序是纯粹的赋值语句(为了讨论的方便,赋值语句看成是对单个动作的描述)的串联,我们能够指出两个连续的动作描述之间的间隔点。
(如果没有go to语句,可以允许前面句子的“连续的动作描述”在语法上存在歧义:如果将其理解成“连续的(动作描述)”,意思是指在文本空间上连续;若果将其理解成“(连续的动作)描述”,则是指时间上连续。
)我们将这样的指示器称之为文本索引。
在考虑条件语句(if B then A),分支语句(if B then A1 else A2),选择语句(case[i] of (A1,A2,…,An)),或者J.McCarthy 介绍的条件语句(B1->E1,B2->E2,…,Bn->En),过程的发展仍然是用单个文本索引描述的。
软件工程导论第6章

70年代初N.Wirth在Pascal语言中设置支持“顺序 结构”、“IF-THEN-ELSE选择结构”、“DO-WHILE 重复结构”或“DO-UNTIL重复结构”三种基本控制 结构语句。
25
3种基本控制结构
(1) 顺序型
A B
(2) 选择型
F P A B T
(2) 多情况选择型(case)
T T
P=1 F P=2 F P=n F
…
A1 A2
T
An
(3) 先判定型循环
后判定型循环
(do-while)
F
(do-until)
P T S
S P F
T
例1、某模块有两个输入a和b,一 个输出c,当满足条件(a>0)and(b<2) 时,c=a+b,否则c=a-b。画出该模 块的程序流程图。
a b
第6章 详细设计
6.1 结构程序设计 6.2 人机界面设计 6.3 过程设计的工具 6.4 面向数据结构的设计方法 6.5 程序复杂程度的定量度量 6.6 小结 习题
1
详细设计阶段的根本目标:确定应该怎样具体地 实现所要求的系统。 为软件结构图中的每一个模块确定使用的算法和 块内数据结构,并用某种选定的表达工具给出清晰 的描述。
100 110
120
130 140
Eq:等于 ne:不等于 gt:大于 lt:小于 ge:大于等于 le:小于等于
例:打印A、B、C三数中最小者的程序 if (A.LT.B .AND. A.LT.C)then write(6,*) A else if (A.GE.B .AND. B.LT.C) then write(6,*) B else write(6,*) C endif endif
文明有害论

文明有害论
美国一些政客在国际事务中惯于使用双重标准、动辄搞所谓的“美国例外”。
一句话,在这些人眼中,美国理所应当永远居于规则之上,规则的尺子是用来量别人的,和美国人自己毫无关系。
一段时间以来,美国一些政客手握双重标准,在贸易、债务、规则、人权等领域大放厥词,暴露出混乱的逻辑和倨傲的姿态。
比如,在世界贸易组织规则问题上,众所周知美国才是迄今为止最大的“不守规矩者”,然而美国一些政客却颠倒黑白,指责中国破坏世贸规则。
又如,在全球气候变化问题上,明明是美方拒绝在共同文本中提及“气候变化”,导致北极理事会部长级会议20多年来第一次未能发表联合声明,但美国国务卿蓬佩奥却指鹿为马,称中俄两国可能对北极造成生态破坏的威胁。
凡此种种,无不暴露出美国“高于规则”的虚妄幻觉、予取予求的蛮横心态。
“美国例外”的本质,是一种文明优越论,即美国与其他任何国家都不一样,“注定是伟大的”并且“必将领导世界”。
比如,在拉美事务上,美国长期视之为自家“后院”,炮制臭名昭著的“门罗主义”,动辄施压、威胁甚至颠覆别国政权,导致拉美地区不得安宁。
又如,美国向一些国家输出所谓民主,结果带来了社会分裂、族群对立,已是人尽皆知。
历史证明,这一观念不仅是虚妄的,也是极其有害的。
Java高级技术课程

系统开发 系统测试 系统运行 系统维护
程序开发的过程
现实世界的问题
现实世界中的解决方案
运行的程序
换个角度看问题
现实世界的问题 现实世界的解决方案 自然语言 语言的鸿沟 编程语言 运行的程序
软件的本质
对软件本质的一种认识
软件
●对现实世界中解决方案的模拟,是现实世界的
解决方案在计算机系统中的映射;
C++与Java不同之处:
在Java 中,一个变量声明是否同时也是定义取决于这 个标识符是一个方法的局部变量还是一个类的数据成 员(Java 中不允许有全局变量)。
例如:int num;
●如果位于一个方法内部,那么它只是一个声明。如果
希望在声明一个局部变量时同时对它进行定义,就必 须给它一个初始值
Java的数据成分
整数类型
C/C++支持整数类型:short、int 和long,支持 无符号整数(unsigned)和有符号整数( signed)类型 C/C++标准要求变量占用的空间满足
●Long >= int >= short >= char
Java 明确规定了一个byte、short、int、long 类 型的整数分别占用1、2、4、8 个字节。 Java规定上述四种类型都是有符号的。
在Java
Java语言的字符集
字符集
C++的字符集
●8 位的ASCII 字符集,范围0 至256 之间;
Java的字符集
●16 位的Unicode 字符集,包含65536 个字符; ●前127 个字符与7 位的ASCII 字符集相同;
图灵及图灵奖

本文内容:1. 图灵生平2. 图灵奖简介3. 历届图灵获得者1.图灵生平阿兰.图灵(Alan Turing)1912年生于英国伦敦,1954年死于英国的曼彻斯特,他是计算机逻辑的奠基者,许多人工智能的重要方法也源自于这位伟大的科学家。
他对计算机的重要贡献在于他提出的有限状态自动机也就是图灵机的概念,对于人工智能,它提出了重要的衡量标准"图灵测试",如果有机器能够通过图灵测试,那他就是一个完全意义上的智能机,和人没有区别了。
他杰出的贡献使他成为计算机界的第一人,现在人们为了纪念这位伟大的科学家将计算机界的最高奖定名为"图灵奖"。
在中学时,他在科学方面的才能就已经显示出来,这种才能仅仅限于非文科的学科上,他的导师希望这位聪明的孩子也能够在历史和文学上有所成就,但是都没有太大的建树。
少年图灵感兴趣的是数学等学科。
在加拿大他开始了他的职业数学生涯,在大学期间这位学生似乎对前人现成的理论并不感兴趣,什么东西都要自己来一次。
大学毕业后,他前往美国普林斯顿大学也正是在那里,他制造出了以后称之为图灵机的东西。
图灵机被公认为现代计算机的原型,这台机器可以读入一系列的零和一,这些数字代表了解决某一问题所需要的步骤,按这个步骤走下去,就可以解决某一特定的问题。
这种观念在当时是具有革命性意义的,因为即使在50年代的时候,大部分的计算机还只能解决某一特定问题,不是通用的,而图灵机从理论上却是通用机。
在图灵看来,这台机器只用保留一些最简单的指令,一个复杂的工作只用把它分解为这几个最简单的操作就可以实现了,在当时他能够具有这样的思想确实是很了不起的。
他相信有一个算法可以解决大部分问题,而困难的部分则是如何确定最简单的指令集,怎么样的指令集才是最少的,而且又能顶用,还有一个难点是如何将复杂问题分解为这些指令的问题。
二战时,图灵在英国通信部工作,他运用他的专业技能破译德国密码,这在当时十分不容易,因为德国人开发出一种用于计算的机器称为Enigma,它能够定期将密码改变,让破译者根本摸不到头绪。
唐良荣《计算机导论-计算思维和应用技术》第2章 程序语言A

第15页 共96页
• 程序功能:算法描述型语言,如C、Java等; 数据描述型语言,如HTML、XML等。 • 编程难易:低级语言,如汇编语言; 高级语言,如C、Java等。 • 设计风格:命令式语言, 结构化语言, 面向对象语言, 函数式语言, 脚本语言等; • 应用领域:通用程序语言,如C、Java等; 专用程序语言,如VHDL、TCL等; • 执行方式:解释型语言, 编译型语言, 编译+解释型语言。
第3页 共96页
• 迪科斯彻名言:
• 编程的艺术就是处理复杂性的艺术。 • 简单是可靠的先决条件。 • 计算机会不会思考这个问题就像问潜水艇会不会游泳一样。
哲学家就餐问题
2.1.1 程序语言的发展
(3)高德纳与数据结构 • 高德纳贡献:
• • • • • • 创建了算法分析领域; 开创了数据结构的最初体系; 《计算机程序设计艺术》是计算机界最受敬重的参考书; 提出文学编程的概念; 开发了Knuth Morris Pratt(字符串查找)算法; 开发了TEX排版软件,成为科技论文的排版程序。
• •
第10页 共96页
例如,微软.NET Framework框架有超过1万个类和10万个方法(子程序)。 例如,程序集成开发环境包含:指令彩色显示,指令和函数提示,错误提示,自动递进,自动收缩,集成调 试器和编译器等。
• 语言抽象级别越高,语言表现力越强大。 • 程序语言发展趋势:
• 声明式编程风格,例如,Prolog、SQL、函数式编程等; • 动态程序语言,例如,PHP、Python等; • 并行编程,例如,UPC、Go等。
《计算机导论——计算思维和应用技术》
第1页 共96页
计算机 第2章 程序语言 2.1 程序特征 2.2 程序结构 2.3 程序员语言介绍 2.4 软件开发方法
方法论-6

6.1.3 常用的几种系统科学方法
1.系统分析法 .
系统分析法是以运筹学和计算机为主要工具,通过对系统 各种要素、过程和关系的考察,确定系统的组成、结构、 功能、效用的方法。系统分析法广泛应用于计算机硬件的 研制和软件的开发,技术产品的革新,环境科学和生态系 统的研究,以及城市管理规划等方面。
2.信息方法 .
6.1.2 系统科学遵循的一般原则
1.整体性原则 .
整体性原则,是基于系统要素对系统的非还原性或非 加和性关系(注:非还原性是指系统的整体具有但还原为 部分便不存在的特性,非加和性是指整体不能完全等于各 部分之和),是系统方法的根据和出发点。这一原则要求 人们在研究系统时,应从整体出发,立足于整体来分析其 部分以及部分之间的关系,进而达到对系统整体的更深刻 的理解。
4 . 环 境 ( Environment ) 、 行 为 ( Behavior ) 和 功 能 (Function) ) 系统的环境是指一个系统之外的一切与它有联系的事物组成 的集合。系统要发挥它应有的作用,达到应有的目标,系统 自身一定要适应环境的要求。 系统的行为是指系统相对于它的环境所表现出来的一切变化。 行为属于系统自身的变化,同时又反映环境对系统的影响和 作用。 系统的功能是指系统行为所引起的、有利于环境中某些事 物乃至整个环境存在与发展的作用。
在讲到系统的整体性时,我们要谈到“涌现性” (Emergent Property)一词。系统科学把整体具有而部分 不具有的东西(即新质的涌现),称为“涌现性”。从层次 结构的角度看,涌现性是指那些高层次具有而还原到低层次 就不复存在的属性、特征、行为和功能。 简单地借用亚里士多德的名言“整体大于部分之和”来表 述整体涌现性是不够的。在某些特殊情况下,当部分构成整 体时,出现了部分所不具有的某些性质,同时又可能丧失了 组成部分单独存在时所具有的某些性质。这个规律叫做“整 体不等于部分之和”原理,也称为“贝塔朗菲定律”。系统 的整体功能是否大于或小于部分功能之和,关键取决于系统 内部诸要素相互联系、相互综合的方式如何。
计算机世界最具影响力的20人

转自:/content/1167588计算机世界最具影响力的20人1、约翰•冯•诺依曼 (John Von Neuman, 1903- 1957)被誉为“电子计算机之父”。
他对人类的最大贡献是对计算机科学、计算机技术和数值分析的开拓性工作,1946 年发明电子计算机。
约翰·冯·诺依曼 ( John Von Nouma,1903-1957),美藉匈牙利人,1903年12月28日生于匈牙利的布达佩斯,父亲是一个银行家,家境富裕,十分注意对孩子的教育。
冯·诺依曼从小聪颖过人,兴趣广泛,读书过目不忘。
据说他6岁时就能用古希腊语同父亲闲谈,一生掌握了七种语言。
最擅德语,可在他用德语思考种种设想时,又能以阅读的速度译成英语。
他对读过的书籍和论文。
能很快一句不差地将内容复述出来,而且若干年之后,仍可如此。
1911年一1921年,冯·诺依曼在布达佩斯的卢瑟伦中学读书期间,就崭露头角而深受老师的器重。
在费克特老师的个别指导下并合作发表了第一篇数学论文,此时冯·诺依曼还不到18岁。
1921年一1923年在苏黎世大学学习。
很快又在1926年以优异的成绩获得了布达佩斯大学数学博士学位,此时冯·诺依曼年仅22岁。
1927年一1929年冯·诺依曼相继在柏林大学和汉堡大学担任数学讲师。
1930年接受了普林斯顿大学客座教授的职位,西渡美国。
1931年成为该校终身教授。
1933年转到该校的高级研究所,成为最初六位教授之一,并在那里工作了一生。
冯·诺依曼是普林斯顿大学、宾夕法尼亚大学、哈佛大学、伊斯坦堡大学、马里兰大学、哥伦比亚大学和慕尼黑高等技术学院等校的荣誉博士。
他是美国国家科学院、秘鲁国立自然科学院和意大利国立林且学院等院的院土。
1954年他任美国原子能委员会委员;1951年至1953年任美国数学会主席。
1954年夏,冯·诺依曼被使现患有癌症,1957年2月8日,在华盛顿去世,终年54岁。
vba goto语句用法

vba goto语句用法VBA GOTO语句用法VBA(Visual Basic for Applications)是一种可以在Microsoft Office 套件中使用的编程语言,用于自定义和自动化各种办公任务。
VBA可以让用户创建、编辑和执行宏,使得可以在Microsoft Office应用程序中自动执行一系列具体操作。
其中,GOTO语句是VBA中的一种流程控制语句,它允许程序跳转到指定的行或标签处执行代码。
在本篇文章中,我们将一步一步地介绍VBA GOTO语句的用法和应用。
第一部分:什么是VBA GOTO语句?在深入讨论VBA GOTO语句的用法之前,让我们先来了解一下它的基本概念。
GOTO是一个被广泛使用的语句,它允许程序跳转到指定的行或标签处执行代码。
这种跳转可以帮助程序在需要的时候以及在特定条件下执行特定的任务。
在VBA中,GOTO语句用于跳转到指定的代码行或标签处。
它是可选的,也就是说,你可以选择使用或不使用它,根据你的具体需求。
第二部分:VBA GOTO语句的基本语法在使用VBA GOTO语句之前,我们需要先了解一下它的基本语法结构。
VBA GOTO语句的基本语法如下:GOTO line_label其中,line_label是指定的代码行或标签。
当程序执行到GOTO语句时,它将跳转到line_label指定的行或标签处执行代码。
第三部分:使用VBA GOTO语句进行无条件跳转首先,我们将讨论VBA GOTO语句的第一种用法,即无条件跳转。
无条件跳转意味着无论在任何情况下,程序都将跳转到指定的代码行或标签处执行代码。
下面是一个简单的示例,演示了如何使用VBA GOTO语句进行无条件跳转:Sub GotoExample()MsgBox "Step 1"Goto MyLabelMsgBox "Step 2"MyLabel:MsgBox "Step 3"End Sub在上面的示例中,我们定义了一个名为GotoExample的子例程。
历届图灵奖获得者及获得原因

获奖原因:程序设计语言的定义与设计。
主要成就:快速排序算法、霍尔逻辑、交谈循序程式。
古典文明研究:1956年,在牛津大学墨顿学院取得西洋古典学学士学位。
6.丹尼斯·里奇(1941-9-9~2011-10-12)美国计算机科学家,C语言之父,UNIX之父,1983年与肯·汤普逊一起获得了图灵奖。
4.肯尼斯·艾佛森(1920-12-17~2004-10-19)美国计算机科学家,1979年获得图灵奖.
获奖原因:程序设计语言和数学符号,互动系统的设计,运用APL进行教学,程序设计语言的理论与实践。
主要成就:数学表达式和编程语言理论。
哈弗之助教:在哈佛大学当助理教授时,他发展了一套数学表达式来操作阵列,以便教授学生。
人民爱戴:一直活跃于挪威政坛,并曾任威左翼非社会主义政党Venstre的执行委员会成员,该党战略委员会主席。他一生获得无数荣誉,深受挪威人民爱戴。
10.奥利-约翰·达尔(Ole-JohanDahl,1931-10-12~2002-1-29)挪威计算机科学家,2001年与克利斯登·奈加特获得图灵奖。
获奖原因:面向对象编程。
历届图灵奖获得者及获得原因
1.艾兹格·迪科斯彻(1930-5-11~2002-8-6)荷兰计算机科学家,1972年获得图灵奖。
获奖原因:程序设计语言的科学与艺术,
主要成就:提出“goto有害论”,提出信号量和PV原语,解决了“哲学家聚餐”问题,最短路径算法和银行家算法的创造者,第一个Algol60编译器的设计者和实现者,THE操作系统的设计者和开发者。
迪科斯彻的名言:“有效的程序员不应该浪费很多时间用于程序调试,他们应该一开始就不要把故障引入。”“程序测试是表明存在故障的非常有效的方法,但对于证明没有故障,调试是很无能为力的。”
计算机学科概论复习资料

计算机学科概论第1章计算机发展史1.诞生于1946年的电子计算机是(D ),它的出现标志着电子计算机时代的到来。
A.EDVACB.APPLEC.IBM PCD.ENIAC2.冯·诺依曼对计算机的主要贡献是(B )。
A.发明了微型计算机B.提出了存储程序的概念C.设计了第一台电子计算机D.提出了高级程序设计语言3.计算机之所以能自动地、连续的进行数据处理,主要是因为(A )。
A.采用了开关电路B.采用了半导体器件C.具有存储程序的功能D.采用了二进制4..计算机硬件系统由5个基本部件组成,不属于这5个基本部件的是(D)。
A.运算器和控制器B.存储器C.输入设备和输出设备D.总线5.我国自行研制的“银河计算机”属于(D )。
A.微型计算机B.小型计算机C.大型计算机D.巨型计算机第2章认识计算机学科1.计算指的是(D )。
A.数的加减乘除、平方、开方等B.函数的微分、积分等C.方程的求解、定理的证明等D.将一个符号f变换成另一个符号串g2.图灵机计算模型的主要贡献是(D )。
A.研究了计算的本质B.描述了计算的过程C.给出了可计算问题的定义D.以上都是3.任何一个学科持续发展的主要动力是(B )。
A.优秀人物的不断涌现B.科学问题的提出和解决C.先进的工具和方法D.当时的历史条件4.首次提出“GOTO语句是有害的”是(C )。
A.克努斯B.阿德勒曼C.迪杰斯特拉D.费根鲍姆5.以下(D )是CC2004报告新增加的专业方向。
A.软件工程B.网络工程C.信息管理D.信息技术6..什么是学科?什么是科学?科学与学科之间的关系如何?学科:⑴学术的分类。
指一定科学领域或一门科学的分支。
⑵教学的科目。
指学校教学内容的基本单位;指为培养人才而设立的教学科目。
科学:运用范畴、定理、定律等思维形式反映现实世界各种现象的本质和规律的知识体系。
学科与科学有着非常密切的关系。
科学研究是以问题为基础的,只要有问题的地方就会有科学与科学研究。
图灵奖获得者读后感

图灵奖获得者读后感1946年,世界上第一台计算机ENIAC诞生于美国宾夕法尼亚大学,随着它的诞生,人类历史开始了计算工具的新时代。
就在10年前——1936年,阿兰〃图灵做出了他一生最重要的科学贡献,他在著名的论文《论可计算数在判定问题中的应用》一文中,以布尔代数为基础,将逻辑中的任意命题用一种通用的机器来表示和完成,并能按照一定的规则推导出结论。
为了奖励那些对计算机科学研究与推动计算机技术发展有卓越贡献的杰出科学家,于1996年美国计算机协会设立了“图灵奖”。
看了图灵奖获得者及他们的卓越贡献,心中的钦佩之情油然而生。
艾伦〃佩利在创始计算机科学教育,使计算机科学成为一门独立的学科上锁发挥的巨大作用而成为首届图灵奖当之无愧的获得者。
佩利的一句话“任何名词都可以变为动词”给了我极大的启示:对呀,任何远大的理想、志向、抱负和对新事物的追求,通过努力和不懈的实践,都是可以实现的。
这是佩利总结自己的一声所形成的至理名言。
我想,它也会是我未来生活中有力的座右铭。
1968年3月,狄克斯特拉发表了那封影响深远的信,他认为“GOTO是有害的”,并从而启发了结构化程序设计的思想。
我想,正是有了这种敢于猜想、大胆质疑的优秀品质,才铸就了这样伟大的成就。
“完美是我们的追求”这是他人生写照,我们作为新一代的科学传承人,更要追求卓越,追求完美。
从明斯基一句流传颇广的话“大脑无非是肉做的机器而已”看出,他坚信并且努力做到科学向智能、人性化的方向发展。
而今,计算机运行速率已经远远超过了人脑的计算速率,只要敢想、敢做,没有什么事不能实现的。
勤奋努力的艾伦〃佩利、善于发现的威尔克斯、敢于探索的哈明、大胆创新的威尔金森……很多很多。
他们为科学铺上了一条平崭的道路,他们是路上的明灯,照亮我们前行的路,为我们提高科学素养,锻炼个人能力提供了最好的例证。
goto有害论

goto有害论.txt世上最珍贵的不是永远得不到或已经得到的,而是你已经得到并且随时都有可能失去的东西!爱情是灯,友情是影子。
灯灭时,你会发现周围都是影子。
朋友,是在最后可以给你力量的人。
Go To Statement Considered Harmful Page 1 of 3Go To Statement Considered HarmfulEdsger W. DijkstraReprinted from Communications of the ACM, Vol. 11, No. 3, March 1968, pp. 147-148.Copyright1968, Association for Computing Machinery, Inc.This is a digitized copy derived from an ACM copyrighted work. It is not guaranteedto be an accuratecopy of the author's original work.Key Words and Phrases:go to statement, jump instruction, branch instruction, conditional clause,alternative clause,repetitive clause, program intelligibility, program sequencingCR Categories:4.22, 6.23,5.24Editor:For a number of years I have been familiar with the observation that the quality ofprogrammers is adecreasing function of the density of go to statements in the programs they produce.More recently Idiscovered why the use of the go to statement has such disastrous effects, and I becameconvinced thatthe go to statement should be abolished from all "higher level" programming languages(i.e. everythingexcept, perhaps, plain machine code). At that time I did not attach too much importanceto thisdiscovery; I now submit my considerations for publication because in very recentdiscussions in whichthe subject turned up, I have been urged to do so.My first remark is that, although the programmer's activity ends when he hasconstructed a correctprogram, the process taking place under control of his program is the true subjectmatter of his activity,for it is this process that has to accomplish the desired effect; it is this processthat in its dynamicbehavior has to satisfy the desired specifications. Yet, once the program has beenmade, the "making' ofthe corresponding process is delegated to the machine.My second remark is that our intellectual powers are rather geared to master staticrelations and that ourpowers to visualize processes evolving in time are relatively poorly developed. Forthat reason weshould do (as wise programmers aware of our limitations) our utmost to shorten theconceptual gapbetween the static program and the dynamic process, to make the correspondence betweenthe program(spread out in text space) and the process (spread out in time) as trivial as possible./classics/oct95/ 9/26/2002Go To Statement Considered Harmful Page 2 of 3Let us now consider how we can characterize the progress of a process. (You may thinkabout thisquestion in a very concrete manner: suppose that a process, considered as a timesuccession of actions, isstopped after an arbitrary action, what data do we have to fix in order that we canredo the process untilthe very same point?) If the program text is a pure concatenation of, say, assignmentstatements (for thepurpose of this discussion regarded as the descriptions of single actions) it issufficient to point in theprogram text to a point between two successive action descriptions. (In the absenceof go to statements Ican permit myself the syntactic ambiguity in the last three words of the previoussentence: if we parsethem as "successive (action descriptions)" we mean successive in text space; if weparse as "(successiveaction) descriptions" we mean successive in time.) Let us call such a pointer to asuitable place in thetext a "textual index."When we include conditional clauses (if B then A), alternative clauses (if B thenA1 else A2), choiceclauses as introduced by C. A. R. Hoare (case[i] of (A1, A2,, An)),or conditionalexpressions asintroduced by J. McCarthy (B1 -> E1, B2 -> E2, , Bn -> En), the fact remains thatthe progress of theprocess remains characterized by a single textual index.As soon as we include in our language procedures we must admit that a single textualindex is no longersufficient. In the case that a textual index points to the interior of a procedurebody the dynamic progressis only characterized when we also give to which call of the procedure we refer. Withthe inclusion ofprocedures we can characterize the progress of the process via a sequence of textualindices, the lengthof this sequence being equal to the dynamic depth of procedure calling.Let us now consider repetition clauses (like, while B repeat A or repeat A until B). Logically speaking,such clauses are now superfluous, because we can express repetition with the aid of recursiveprocedures. For reasons of realism I don't wish to exclude them: on the one hand, repetition clauses canbe implemented quite comfortably with present day finite equipment; on the other hand, the reasoningpattern known as "induction" makes us well equipped to retain our intellectual grasp on the processesgenerated by repetition clauses. With the inclusion of the repetition clauses textual indices are no longersufficient to describe the dynamic progress of the process. With each entry into a repetition clause,however, we can associate a so-called "dynamic index," inexorably counting the ordinal number of thecorresponding current repetition. As repetition clauses (just as procedure calls) may be applied nestedly,we find that now the progress of the process can always be uniquely characterized by a (mixed)sequence of textual and/or dynamic indices.The main point is that the values of these indices are outside programmer's control; they are generated(either by the write-up of his program or by the dynamic evolution of the process) whether he wishes ornot. They provide independent coordinates in which to describe the progress of the process.Why do we need such independent coordinates? The reason is - and this seems to be inherent tosequential processes - that we can interpret the value of a variable only with respect to the progress ofthe process. If we wish to count the number, n say, of people in an initially empty room, we can achievethis by increasing n by one whenever we see someone entering the room. In the in-between moment thatwe have observed someone entering the room but have not yet performed the subsequent increase of n,its value equals the number of people in the room minus one!The unbridled use of the go to statement has an immediate consequence that it becomes terribly hard tofind a meaningful set of coordinates in which to describe the process progress.Usually, people take intoaccount as well the values of some well chosen variables, but this is out of thequestion because it isrelative to the progress that the meaning of these values is to be understood! Withthe go to statementone can, of course, still describe the progress uniquely by a counter counting thenumber of actionsperformed since program start (viz. a kind of normalized clock). The difficulty isthat such a coordinate,/classics/oct95/ 9/26/2002Go To Statement Considered Harmful Page 3 of 3although unique, is utterly unhelpful. In such a coordinate system it becomes anextremely complicatedaffair to define all those points of progress where, say, n equals the number ofpersons in the roomminus one!The go to statement as it stands is just too primitive; it is too much an invitationto make a mess of one'sprogram. One can regard and appreciate the clauses considered as bridling its use.I do not claim that theclauses mentioned are exhaustive in the sense that they will satisfy all needs, butwhatever clauses aresuggested (e.g. abortion clauses) they should satisfy the requirement that aprogrammer independentcoordinate system can be maintained to describe the process in a helpful andmanageable way.It is hard to end this with a fair acknowledgment. Am I to judge by whom my thinkinghas beeninfluenced? It is fairly obvious that I am not uninfluenced by Peter Landin andChristopher Strachey.Finally I should like to record (as I remember it quite distinctly) how Heinz Zemanekat the pre-ALGOLmeeting in early 1959 in Copenhagen quite explicitly expressed his doubts whetherthe go to statementshould be treated on equal syntactic footing with the assignment statement. To amodest extent I blamemyself for not having then drawn the consequences of his remarkThe remark about the undesirability of the go to statement is far from new. I rememberhaving read theexplicit recommendation to restrict the use of the go to statement to alarm exits,but I have not been ableto trace it; presumably, it has been made by C. A. R. Hoare. In [1, Sec. 3.2.1.] Wirthand Hoare togethermake a remark in the same direction in motivating the case construction: "Like theconditional, itmirrors the dynamic structure of a program more clearly than go to statements andswitches, and iteliminates the need for introducing a large number of labels in the program."In [2] Guiseppe Jacopini seems to have proved the (logical) superfluousness of thego to statement. Theexercise to translate an arbitrary flow diagram more or less mechanically into ajump-less one, however,is not to be recommended. Then the resulting flow diagram cannot be expected to bemore transparentthan the original one.References:1. Wirth, Niklaus, and Hoare C. A. R. A contribution to the development of ALGOL.Comm. ACM 9(June 1966), 413-432.2. Bhm, Corrado, and Jacopini Guiseppe. Flow diagrams, Turing machines andlanguages withonly two formation rules. Comm. ACM 9 (May 1966), 366-371.Edsger W. DijkstraTechnological UniversityEindhoven, The Netherlands/classics/oct95/ 9/26/2002转到视为有害3页1声明转至有害无益声明Edsger瓦特迪杰斯特拉从转载的ACM,卷通讯。
toulmin model例子(一)

toulmin model例子(一)Toulmin Model在本文中,我们将使用Toulmin模型来探讨一些例子并对其进行详细讲解。
Toulmin模型是一种用于分析和评估论证的方法,由英国哲学家Stephen Toulmin提出。
它包括了六个主要组成部分:claim(主张)、grounds(依据)、warrant(推理)、backing(支持)、rebuttal(反驳)和qualifier(限定词)。
下面是具体例子:1. Claim:Smoking should be banned in all public places.在这个例子中,我们的主张是禁止在所有公共场所吸烟。
2. Grounds:a.长期吸烟对健康有害;b.二手烟对他人健康有害。
a. 长期吸烟对健康有害这一依据指出吸烟对吸烟者自身的健康有害。
它可以通过大量的科学研究和医学报告来支持。
b. 二手烟对他人健康有害这一依据指出吸烟对身边的他人健康有害。
它同样可以通过科学研究和医学报告来支持。
3. Warrant:由于长期吸烟对吸烟者和身边的他人健康有害,所以我们应该在所有公共场所禁止吸烟。
推理是一个基于已有的证据和观点之间的合理关联的逻辑过程。
在这个例子中,我们通过已有的科学研究支持了吸烟对健康的危害,因此可以得出结论:禁止吸烟将有助于保护人们的健康。
4. Backing:科学研究和医学报告提供了这些依据的支持。
为了支持我们的主张和依据,我们需要提供一些可信的来源和证据,这可以是过去的研究、报告或专家意见。
在这个例子中,我们可以引用一些权威的医学研究来支持我们的观点,并说明这些研究是经过合理验证的。
5. Rebuttal:吸烟者可能会争辩说他们有权利在公共场所吸烟,因为吸烟是个人选择。
反驳部分是对可能存在的异议进行回应。
在这个例子中,吸烟者可能会主张他们有权利选择吸烟的地方。
为了反驳这个异议,我们可以提出公共场所应保护每个人的健康和福祉的观点。
goto有害论

goto有害论.txt世上最珍贵的不是永远得不到或已经得到的,而是你已经得到并且随时都有可能失去的东西!爱情是灯,友情是影子。
灯灭时,你会发现周围都是影子。
朋友,是在最后可以给你力量的人。
Go To Statement Considered Harmful Page 1 of 3Go To Statement Considered HarmfulEdsger W. DijkstraReprinted from Communications of the ACM, Vol. 11, No. 3, March 1968, pp. 147-148.Copyright1968, Association for Computing Machinery, Inc.This is a digitized copy derived from an ACM copyrighted work. It is not guaranteedto be an accuratecopy of the author's original work.Key Words and Phrases:go to statement, jump instruction, branch instruction, conditional clause,alternative clause,repetitive clause, program intelligibility, program sequencingCR Categories:4.22, 6.23,5.24Editor:For a number of years I have been familiar with the observation that the quality ofprogrammers is adecreasing function of the density of go to statements in the programs they produce.More recently Idiscovered why the use of the go to statement has such disastrous effects, and I becameconvinced thatthe go to statement should be abolished from all "higher level" programming languages(i.e. everythingexcept, perhaps, plain machine code). At that time I did not attach too much importanceto thisdiscovery; I now submit my considerations for publication because in very recentdiscussions in whichthe subject turned up, I have been urged to do so.My first remark is that, although the programmer's activity ends when he hasconstructed a correctprogram, the process taking place under control of his program is the true subjectmatter of his activity,for it is this process that has to accomplish the desired effect; it is this processthat in its dynamicbehavior has to satisfy the desired specifications. Yet, once the program has beenmade, the "making' ofthe corresponding process is delegated to the machine.My second remark is that our intellectual powers are rather geared to master staticrelations and that ourpowers to visualize processes evolving in time are relatively poorly developed. Forthat reason weshould do (as wise programmers aware of our limitations) our utmost to shorten theconceptual gapbetween the static program and the dynamic process, to make the correspondence betweenthe program(spread out in text space) and the process (spread out in time) as trivial as possible./classics/oct95/ 9/26/2002Go To Statement Considered Harmful Page 2 of 3Let us now consider how we can characterize the progress of a process. (You may thinkabout thisquestion in a very concrete manner: suppose that a process, considered as a timesuccession of actions, isstopped after an arbitrary action, what data do we have to fix in order that we canredo the process untilthe very same point?) If the program text is a pure concatenation of, say, assignmentstatements (for thepurpose of this discussion regarded as the descriptions of single actions) it issufficient to point in theprogram text to a point between two successive action descriptions. (In the absenceof go to statements Ican permit myself the syntactic ambiguity in the last three words of the previoussentence: if we parsethem as "successive (action descriptions)" we mean successive in text space; if weparse as "(successiveaction) descriptions" we mean successive in time.) Let us call such a pointer to asuitable place in thetext a "textual index."When we include conditional clauses (if B then A), alternative clauses (if B thenA1 else A2), choiceclauses as introduced by C. A. R. Hoare (case[i] of (A1, A2,, An)),or conditionalexpressions asintroduced by J. McCarthy (B1 -> E1, B2 -> E2, , Bn -> En), the fact remains thatthe progress of theprocess remains characterized by a single textual index.As soon as we include in our language procedures we must admit that a single textualindex is no longersufficient. In the case that a textual index points to the interior of a procedurebody the dynamic progressis only characterized when we also give to which call of the procedure we refer. Withthe inclusion ofprocedures we can characterize the progress of the process via a sequence of textualindices, the lengthof this sequence being equal to the dynamic depth of procedure calling.Let us now consider repetition clauses (like, while B repeat A or repeat A until B). Logically speaking,such clauses are now superfluous, because we can express repetition with the aid of recursiveprocedures. For reasons of realism I don't wish to exclude them: on the one hand, repetition clauses canbe implemented quite comfortably with present day finite equipment; on the other hand, the reasoningpattern known as "induction" makes us well equipped to retain our intellectual grasp on the processesgenerated by repetition clauses. With the inclusion of the repetition clauses textual indices are no longersufficient to describe the dynamic progress of the process. With each entry into a repetition clause,however, we can associate a so-called "dynamic index," inexorably counting the ordinal number of thecorresponding current repetition. As repetition clauses (just as procedure calls) may be applied nestedly,we find that now the progress of the process can always be uniquely characterized by a (mixed)sequence of textual and/or dynamic indices.The main point is that the values of these indices are outside programmer's control; they are generated(either by the write-up of his program or by the dynamic evolution of the process) whether he wishes ornot. They provide independent coordinates in which to describe the progress of the process.Why do we need such independent coordinates? The reason is - and this seems to be inherent tosequential processes - that we can interpret the value of a variable only with respect to the progress ofthe process. If we wish to count the number, n say, of people in an initially empty room, we can achievethis by increasing n by one whenever we see someone entering the room. In the in-between moment thatwe have observed someone entering the room but have not yet performed the subsequent increase of n,its value equals the number of people in the room minus one!The unbridled use of the go to statement has an immediate consequence that it becomes terribly hard tofind a meaningful set of coordinates in which to describe the process progress.Usually, people take intoaccount as well the values of some well chosen variables, but this is out of thequestion because it isrelative to the progress that the meaning of these values is to be understood! Withthe go to statementone can, of course, still describe the progress uniquely by a counter counting thenumber of actionsperformed since program start (viz. a kind of normalized clock). The difficulty isthat such a coordinate,/classics/oct95/ 9/26/2002Go To Statement Considered Harmful Page 3 of 3although unique, is utterly unhelpful. In such a coordinate system it becomes anextremely complicatedaffair to define all those points of progress where, say, n equals the number ofpersons in the roomminus one!The go to statement as it stands is just too primitive; it is too much an invitationto make a mess of one'sprogram. One can regard and appreciate the clauses considered as bridling its use.I do not claim that theclauses mentioned are exhaustive in the sense that they will satisfy all needs, butwhatever clauses aresuggested (e.g. abortion clauses) they should satisfy the requirement that aprogrammer independentcoordinate system can be maintained to describe the process in a helpful andmanageable way.It is hard to end this with a fair acknowledgment. Am I to judge by whom my thinkinghas beeninfluenced? It is fairly obvious that I am not uninfluenced by Peter Landin andChristopher Strachey.Finally I should like to record (as I remember it quite distinctly) how Heinz Zemanekat the pre-ALGOLmeeting in early 1959 in Copenhagen quite explicitly expressed his doubts whetherthe go to statementshould be treated on equal syntactic footing with the assignment statement. To amodest extent I blamemyself for not having then drawn the consequences of his remarkThe remark about the undesirability of the go to statement is far from new. I rememberhaving read theexplicit recommendation to restrict the use of the go to statement to alarm exits,but I have not been ableto trace it; presumably, it has been made by C. A. R. Hoare. In [1, Sec. 3.2.1.] Wirthand Hoare togethermake a remark in the same direction in motivating the case construction: "Like theconditional, itmirrors the dynamic structure of a program more clearly than go to statements andswitches, and iteliminates the need for introducing a large number of labels in the program."In [2] Guiseppe Jacopini seems to have proved the (logical) superfluousness of thego to statement. Theexercise to translate an arbitrary flow diagram more or less mechanically into ajump-less one, however,is not to be recommended. Then the resulting flow diagram cannot be expected to bemore transparentthan the original one.References:1. Wirth, Niklaus, and Hoare C. A. R. A contribution to the development of ALGOL.Comm. ACM 9(June 1966), 413-432.2. Bhm, Corrado, and Jacopini Guiseppe. Flow diagrams, Turing machines andlanguages withonly two formation rules. Comm. ACM 9 (May 1966), 366-371.Edsger W. DijkstraTechnological UniversityEindhoven, The Netherlands/classics/oct95/ 9/26/2002转到视为有害3页1声明转至有害无益声明Edsger瓦特迪杰斯特拉从转载的ACM,卷通讯。
Goto有害论翻译

Go To Statement Considered Harmful Edsger W.Dijkstrainterpreter:sdulmz经过数年的观察我发现:编程人员的质量是其在程序中产生的go to语句密度的减函数。
最近,我发现了为什么go to语句的使用会有这样灾难性的影响,并且我坚信go to语句应该从所有的“高级”编程语言中取消。
当时我并没有十分重视这一发现;现在才考虑提交并出版是因为在最近的研究中这一问题又出现了,我不得不这样做了。
第一个备注是:尽管程序员的活动在他构造出正确的程序时就结束了,但是在程序控制下发生的过程才是其活动的真正的主题,因为是过程完实现了预期效果;同时是过程的动态行为满足了预期指标。
但是,当编写完程序后,程序相应的过程的构造往往交给机器去完成。
第二个备注是:人类智能在掌握静态关系方面变现的非常不错,人类智能在想象实时过程方面相对地发育不良。
因此,我们应该尽最大的努力缩短静态程序和动态过程的概念上的间隙,从而使程序(分散在文本空间上)和过程(分散在时间上)尽可能一致。
现在考虑一下我们是怎样描述过程的的发展的。
(你可能会用具体的方式考虑这个问题:假设一个过程(过程看成是一次连续的动作)在任意动作后停止,我们必须修正什么数据才能使过程重新进行到相同的点?)如果程序是纯粹的赋值语句(为了讨论的方便,赋值语句看成是对单个动作的描述)的串联,我们能够指出两个连续的动作描述之间的间隔点。
(如果没有go to语句,可以允许前面句子的“连续的动作描述”在语法上存在歧义:如果将其理解成“连续的(动作描述)”,意思是指在文本空间上连续;若果将其理解成“(连续的动作)描述”,则是指时间上连续。
)我们将这样的指示器称之为文本索引。
在考虑条件语句(if B then A),分支语句(if B then A1 else A2),选择语句(case[i] of (A1,A2,…,An)),或者J.McCarthy 介绍的条件语句(B1->E1,B2->E2,…,Bn->En),过程的发展仍然是用单个文本索引描述的。
addict to 用法

addict to 用法
随着社会发展,越来越多的人开始沾染上一些坏习惯,他们会有令人厌恶的行为出现,他们能够沉迷于毒品、游戏、网络等。
这种现象被称为“addict to法”,是一种负面的行为,必须加以重视,让我们弄清这种现象。
首先,addict to法是一种对科技、娱乐和游戏的沉迷。
一些人可能会沉迷于游戏,不能专注于学习,甚至会花大量的金钱和时间。
在现实生活中,他们可能会忘记自己健康和职责,甚至放弃梦想,去追求他们喜欢的活动。
此外,他们会陷入相互间的竞争,以追求一定的目标,而忽略了自身的健康。
其次,addict to法,也可能会对人的精神健康有害。
当一个人沉迷于某种活动时,他可能会忽略自己的健康,当自己的生活陷入僵局时,他会变得焦虑和抑郁,最终导致自暴自弃。
此外,addict to法,还会影响一个人的社交能力。
一些人经常会把大部分时间都花在游戏、电视、网络或其他活动上,因此缺乏与朋友进行交流和社交的机会。
他们可能会被认为没有礼仪和举止,也不懂得怎样与人们相处,最终导致外界疏离。
最后,addict to法,也会给家庭及家庭成员带来不良影响。
当一个人沉迷于某种活动时,他可能会忽视家庭和家庭成员,不去考虑家人的感受,而只去追求自己的某一目标,从而给家庭成员带来不良的影响。
总之,addict to法,是一种令人畏惧的现象,必须加以重视,
这种现象对个人、社会和家庭都有害,因此,社会上应该有更多的宣传,让公众意识到这种行为的危害,尤其是于青少年,他们应该尽快克服沉迷,从而拥有健康的身心。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Go To Statement Considered Harmful Page 1 of 3Go To Statement Considered HarmfulEdsger W. DijkstraReprinted from Communications of the ACM, Vol. 11, No. 3, March 1968, pp. 147-148.Copyright1968, Association for Computing Machinery, Inc.This is a digitized copy derived from an ACM copyrighted work. It is not guaranteedto be an accuratecopy of the author's original work.Key Words and Phrases:go to statement, jump instruction, branch instruction, conditional clause,alternative clause,repetitive clause, program intelligibility, program sequencingCR Categories:4.22, 6.23,5.24Editor:For a number of years I have been familiar with the observation that the quality ofprogrammers is adecreasing function of the density of go to statements in the programs they produce.More recently Idiscovered why the use of the go to statement has such disastrous effects, and I becameconvinced thatthe go to statement should be abolished from all "higher level" programming languages(i.e. everythingexcept, perhaps, plain machine code). At that time I did not attach too much importanceto thisdiscovery; I now submit my considerations for publication because in very recentdiscussions in whichthe subject turned up, I have been urged to do so.My first remark is that, although the programmer's activity ends when he hasconstructed a correctprogram, the process taking place under control of his program is the true subjectmatter of his activity,for it is this process that has to accomplish the desired effect; it is this processthat in its dynamicbehavior has to satisfy the desired specifications. Yet, once the program has beenmade, the "making' ofthe corresponding process is delegated to the machine.My second remark is that our intellectual powers are rather geared to master staticrelations and that ourpowers to visualize processes evolving in time are relatively poorly developed. Forthat reason weshould do (as wise programmers aware of our limitations) our utmost to shorten theconceptual gapbetween the static program and the dynamic process, to make the correspondence betweenthe program(spread out in text space) and the process (spread out in time) as trivial as possible./classics/oct95/ 9/26/2002Go To Statement Considered Harmful Page 2 of 3Let us now consider how we can characterize the progress of a process. (You may thinkabout thisquestion in a very concrete manner: suppose that a process, considered as a timesuccession of actions, isstopped after an arbitrary action, what data do we have to fix in order that we canredo the process untilthe very same point?) If the program text is a pure concatenation of, say, assignmentstatements (for thepurpose of this discussion regarded as the descriptions of single actions) it issufficient to point in theprogram text to a point between two successive action descriptions. (In the absenceof go to statements Ican permit myself the syntactic ambiguity in the last three words of the previoussentence: if we parsethem as "successive (action descriptions)" we mean successive in text space; if weparse as "(successiveaction) descriptions" we mean successive in time.) Let us call such a pointer to asuitable place in thetext a "textual index."When we include conditional clauses (if B then A), alternative clauses (if B thenA1 else A2), choiceclauses as introduced by C. A. R. Hoare (case[i] of (A1, A2,, An)),or conditionalexpressions asintroduced by J. McCarthy (B1 -> E1, B2 -> E2, , Bn -> En), the fact remains thatthe progress of theprocess remains characterized by a single textual index.As soon as we include in our language procedures we must admit that a single textualindex is no longersufficient. In the case that a textual index points to the interior of a procedurebody the dynamic progressis only characterized when we also give to which call of the procedure we refer. Withthe inclusion ofprocedures we can characterize the progress of the process via a sequence of textualindices, the lengthof this sequence being equal to the dynamic depth of procedure calling.Let us now consider repetition clauses (like, while B repeat A or repeat A until B). Logically speaking,such clauses are now superfluous, because we can express repetition with the aid of recursiveprocedures. For reasons of realism I don't wish to exclude them: on the one hand, repetition clauses canbe implemented quite comfortably with present day finite equipment; on the other hand, the reasoningpattern known as "induction" makes us well equipped to retain our intellectual grasp on the processesgenerated by repetition clauses. With the inclusion of the repetition clauses textual indices are no longersufficient to describe the dynamic progress of the process. With each entry into a repetition clause,however, we can associate a so-called "dynamic index," inexorably counting the ordinal number of thecorresponding current repetition. As repetition clauses (just as procedure calls) may be applied nestedly,we find that now the progress of the process can always be uniquely characterized by a (mixed)sequence of textual and/or dynamic indices.The main point is that the values of these indices are outside programmer's control; they are generated(either by the write-up of his program or by the dynamic evolution of the process) whether he wishes ornot. They provide independent coordinates in which to describe the progress of the process.Why do we need such independent coordinates? The reason is - and this seems to be inherent tosequential processes - that we can interpret the value of a variable only with respect to the progress ofthe process. If we wish to count the number, n say, of people in an initially empty room, we can achievethis by increasing n by one whenever we see someone entering the room. In the in-between moment thatwe have observed someone entering the room but have not yet performed the subsequent increase of n,its value equals the number of people in the room minus one!The unbridled use of the go to statement has an immediate consequence that it becomes terribly hard tofind a meaningful set of coordinates in which to describe the process progress.Usually, people take intoaccount as well the values of some well chosen variables, but this is out of thequestion because it isrelative to the progress that the meaning of these values is to be understood! Withthe go to statementone can, of course, still describe the progress uniquely by a counter counting thenumber of actionsperformed since program start (viz. a kind of normalized clock). The difficulty isthat such a coordinate,/classics/oct95/ 9/26/2002Go To Statement Considered Harmful Page 3 of 3although unique, is utterly unhelpful. In such a coordinate system it becomes anextremely complicatedaffair to define all those points of progress where, say, n equals the number ofpersons in the roomminus one!The go to statement as it stands is just too primitive; it is too much an invitationto make a mess of one'sprogram. One can regard and appreciate the clauses considered as bridling its use.I do not claim that theclauses mentioned are exhaustive in the sense that they will satisfy all needs, butwhatever clauses aresuggested (e.g. abortion clauses) they should satisfy the requirement that aprogrammer independentcoordinate system can be maintained to describe the process in a helpful andmanageable way.It is hard to end this with a fair acknowledgment. Am I to judge by whom my thinkinghas beeninfluenced? It is fairly obvious that I am not uninfluenced by Peter Landin andChristopher Strachey.Finally I should like to record (as I remember it quite distinctly) how Heinz Zemanekat the pre-ALGOLmeeting in early 1959 in Copenhagen quite explicitly expressed his doubts whetherthe go to statementshould be treated on equal syntactic footing with the assignment statement. To amodest extent I blamemyself for not having then drawn the consequences of his remarkThe remark about the undesirability of the go to statement is far from new. I rememberhaving read theexplicit recommendation to restrict the use of the go to statement to alarm exits,but I have not been ableto trace it; presumably, it has been made by C. A. R. Hoare. In [1, Sec. 3.2.1.] Wirthand Hoare togethermake a remark in the same direction in motivating the case construction: "Like theconditional, itmirrors the dynamic structure of a program more clearly than go to statements andswitches, and iteliminates the need for introducing a large number of labels in the program."In [2] Guiseppe Jacopini seems to have proved the (logical) superfluousness of thego to statement. Theexercise to translate an arbitrary flow diagram more or less mechanically into ajump-less one, however,is not to be recommended. Then the resulting flow diagram cannot be expected to bemore transparentthan the original one.References:1. Wirth, Niklaus, and Hoare C. A. R. A contribution to the development of ALGOL.Comm. ACM 9(June 1966), 413-432.2. Bhm, Corrado, and Jacopini Guiseppe. Flow diagrams, Turing machines andlanguages withonly two formation rules. Comm. ACM 9 (May 1966), 366-371.Edsger W. DijkstraTechnological UniversityEindhoven, The Netherlands/classics/oct95/ 9/26/2002转到视为有害3页1声明转至有害无益声明Edsger瓦特迪杰斯特拉从转载的ACM,卷通讯。