50年前,Hello World发明者第一次提交的Go代码长这样……

2022 年 2 月 16 日 CSDN

作者 | 郭露        责编 | 张红月
出品 | CSDN(ID:CSDNnews)

作为Unix的研发者与传奇代码“Hello World”的发明者,普林斯顿大学计算机科学系教授布莱恩·克尼汉(Brian W. Kernighan)是编程界的传奇人物。他曾参与创造了AMPL(数学编程语言)和AWK(文本处理工具),也曾和C语言之父丹尼斯·里奇(Dennis MacAlistair Ritchie)共同编写《C程序设计语言》(The C Programming Language)。

不仅如此,据调查,Brian W. Kernighan竟在1972年7月18日首次提交Go代码。

commit 7d7c6a97f815e9279d08cfaea7d5efb5e90695a8Author: Brian Kernighan <bwk>Date:   Tue Jul 18 19:05:45 1972 -0500
hello, world
R=ken DELTA=7 (7 added, 0 deleted, 0 changed)
diff --git a/src/pkg/debug/macho/testdata/hello.b b/src/pkg/debug/macho/testdata/hello.bnew file mode 100644index 0000000000..05c4140424--- /dev/null+++ b/src/pkg/debug/macho/testdata/hello.b@@ -0,0 +1,7 @@+main( ) {+ extrn a, b, c;+ putchar(a); putchar(b); putchar(c); putchar('!*n');+} +a 'hell';+b 'o, w';+c 'orld';

在接下来的十多年中,布莱恩仍在不断进行修改:

  • 1974年1月20日01:02:03:布莱恩提交了convert to C,将B语言的Hello World改为C语言实现;

  • 1988年4月1日02:02:04:提交convert to Draft-Proposed ANSI C,将Hello World改为草案中提出的ANSI C实现;

  • 1988年4月1日02:03:04:提交last-minute fix: convert to ANSI C,最后修改,改为ANSI C实现。

  • 1988年,布莱恩团队决定暂停更新。直到20年后的2007年9月,罗伯特·格瑞史莫(Robert Griesemer),罗勃·派克(Rob Pike)和肯·汤普逊(Ken Thompson)开始设计Go,提交了Go spec starting point。

直到现在,这些早期提交的文件(即最终的ANSI C 版本)仍保留在Go repo中。

【参考资料】

  • https://repography.com/blog/go-first-commit

  • https://github.com/golang/go/commit/0bb0b61d6a85b2a1a33dcbc418089656f2754d32

  • https://github.com/golang/go/commit/0744ac969119db8a0ad3253951d375eb77cfce9e

  • https://github.com/golang/go/commit/d82b11e4a46307f1f1415024f33263e819c222b8

新程序员003》正式上市,50余位技术专家共同创作,云原生和数字化的开发者们的一本技术精选图书。内容既有发展趋势及方法论结构,华为、阿里、字节跳动、网易、快手、微软、亚马逊、英特尔、西门子、施耐德等30多家知名公司云原生和数字化一手实战经验!


   
   
     
达 500 亿美元!AMD 完成收购赛灵思
☞这才是程序员的元宵节打开方式:亲手做一盏花灯!
从1750亿到1.6万亿,人工智能未来:除了大模型,还有什么?
登录查看更多
1

相关内容

【电子书】机器学习实战(Machine Learning in Action),附PDF
专知会员服务
124+阅读 · 2019年11月25日
【精通OpenCV 4】Mastering OpenCV 4 - Third Edition 随书代码
专知会员服务
35+阅读 · 2019年11月13日
资源 | 李航老师《统计学习方法》(第2版)课件下载
专知会员服务
248+阅读 · 2019年11月10日
「Hello World」中的「bug」
机器之心
0+阅读 · 2022年3月22日
微软停止对Visual Studio旧版支持
CSDN
0+阅读 · 2022年2月15日
已删除
将门创投
11+阅读 · 2019年7月4日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
1+阅读 · 2010年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
Arxiv
12+阅读 · 2019年3月14日
Arxiv
31+阅读 · 2018年11月13日
VIP会员
相关基金
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
1+阅读 · 2010年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
Top
微信扫码咨询专知VIP会员