我们只做一件事,只为您满意--山东微道商网络技术有限公司
当前位置:主页 -> 新闻中心 > 行业资讯 >

Hello World 为什么是总是出现在变成第一堂课?

来源:http://www.jnzyjz.cn/ 发布时间:2021-08-18

Hello, World是由 Brian Kernighan 创建的。1978年,Brian Kernighan写了一本名叫《C程序设计语言》的编程书,在程序员中广为流传。他在这本书中第一次引用的Hello World程序,源自他在1973年编写的一部讲授 B语言的编程教程:
Hello, world was created by Brian Kernighan. In 1978, Brian Kernighan wrote a programming book called C programming language, which was widely circulated among programmers. The Hello world program he first quoted in this book comes from a programming course for teaching B language written by him in 1973:
main (){
main (){
extrn a,b,c;
extrn a,b,c;
putchar (a); putchar (b); putchar (c); putchar ('!*n');
putchar (a);  putchar (b);  putchar (c);  putchar ('!* n');
}
}
a 'hell';
a 'hell';
b 'o, w';
b 'o, w';
c 'orld';
c 'orld';
但是非常不幸的是,当 Forbes India 杂志采访他的时候,他自己对这段传奇故事中一些记忆已经有点儿模糊了。
But unfortunately, when Forbes India magazine interviewed him, some of his own memories of this legend were a little blurred.
当他被问及为什么选择『Hello, World!』时,他回答说,『我只记得,我好像看过一幅漫画,讲述一枚鸡蛋和一只小鸡的故事,在那副漫画中,小鸡说了一句‘Hello World’』。
When asked why he chose "Hello, world!" He replied, "I only remember that I seem to have seen a cartoon telling the story of an egg and a chicken. In that cartoon, the chicken said 'hello world'".
济南做网站
鉴于Hello World这个计算机程序的广泛流行程度,这个起因看起来还是蛮合适的。
Given the widespread popularity of the computer program Hello world, this cause seems quite appropriate.
那个时候,无论是 Kernighan,还是他的同事 Dennis Ritchie - C语言之父,都无法想象C语言以及这本教程书将会在今天如此之流行。
At that time, neither Kernighan nor his colleague Dennis Ritchie - the father of C language could imagine that C language and this tutorial book would be so popular today.
他们所做的工作只是贝尔实验室的一个研究项目,而在当时,贝尔实验室也只是美国电话电报公司(AT&T)的技术研究与开发机构而已。
Their work was just a research project of Bell Labs, which was only a technical research and development organization of at & T at that time.
尽管没人能够科学地解释为什么Hello World如此地流行,但是,Hello, World程序的确在计算机发展历史上成为了一个具有重要意义的里程碑。我们一起来回顾一下当时的历史环境。
Although no one can scientifically explain why Hello world is so popular, Hello, world program has indeed become an important milestone in the history of computer development. Let's review the historical environment at that time.
襁褓中的变革
Change in infancy
现在你可能很难想象,但是在Hello World连同Kernighan的编程书出版之前,计算机对于公众来说,几乎隐含着一种负面的意义。
It may be hard for you to imagine now, but before Hello world and Kernighan's programming book were published, computers almost implied a negative meaning to the public.
在1970年代,主机时代的计算机,不仅运行缓慢,体积庞大到足以占用整个一间屋子,而且还需要一位全职的科学家或者研究者来维护它。
In the 1970s, computers in the mainframe era not only ran slowly and bulky enough to occupy an entire room, but also needed a full-time scientist or researcher to maintain it.
事实上,在1970年代后期之前,计算机科学家在编程的时候还要使用大量的打孔卡!
In fact, before the late 1970s, computer scientists used a lot of punch cards when programming!
本文由济南做网站整理发布,您是不是对这些内容有所了解了呢?更多的内容请点击:http://www.jnzyjz.cn我们会有更多精彩内容等你查看。
This article is compiled and published by Jinan website. Do you know something about these contents? For more information, please click: http://www.jnzyjz.cn We will have more wonderful content for you to see.
相关文章
相关推荐