为什么 Go 1.5 要用 Go 重新写 compiler ?

2015 年 8 月 20 日
 wuruxu

今天看到 Go1.5 全部采用 Go lang 重新写了。
为什么抛弃 C, 是不是这样更快点?这样做法有什么优势吗?

4947 次点击
所在节点    Go 编程语言
46 条回复
sablib
2015 年 8 月 20 日
为了实现自举吧。
wakemecn
2015 年 8 月 20 日
我今天第一次下载 go 就用了新版==
tabris17
2015 年 8 月 20 日
为了逼格,向 C 致敬
Bown
2015 年 8 月 20 日
- It is easier to write correct Go code than to write correct C code.
- It is easier to debug incorrect Go code than to debug incorrect C code.
- Work on a Go compiler necessarily requires a good understanding of Go. Implementing the compiler in C adds an unnecessary second requirement.
- Go makes parallel execution trivial compared to C.
- Go has better standard support than C for modularity, for automated rewriting, for unit testing, and for profiling.
- Go is much more fun to use than C.

https://docs.google.com/document/d/1P3BLR31VA8cvLJLfMibSuTdwTuF7WWLux71CYD0eeD8/edit
chmlai
2015 年 8 月 20 日
自举
vipygd
2015 年 8 月 20 日
自举
windyboy
2015 年 8 月 20 日
我只能说真的强悍
yakczh
2015 年 8 月 20 日
为啥 perl6 自举失败了
oska874
2015 年 8 月 20 日
以前不举,现在终于硬了。
hooluupog
2015 年 8 月 20 日
loading
2015 年 8 月 20 日
go 很早就完成自举了,不是新鲜事!
songjiaxin2008
2015 年 8 月 20 日
先有鸡先有蛋的问题吗
lujiajing1126
2015 年 8 月 20 日
实现自举
janxin
2015 年 8 月 20 日
为了自举。就是信仰
echo1937
2015 年 8 月 20 日
其实自举的语言太多了, C 干过, C 艹干过, Java 干过, rust 干过, Python 的 Pypy 也干过,不少见。
mathgl
2015 年 8 月 20 日
@yakczh perl6 改东西太多,自己挖坑,一头掉下去了。
undeflife
2015 年 8 月 20 日
@loading 用 Go 重新写 Compiler 才能叫自举(bootstrapping ) 你所谓的早就完成是什么意思?
timothyye
2015 年 8 月 20 日
自举是一种信仰,哈哈
realpg
2015 年 8 月 20 日
一直觉得自举就是为了那啥而那啥

用汇编写个编译器才是王道……

你编译这个编译器用的还不是 C 写的编译器 6
phx13ye
2015 年 8 月 20 日
bootstrap

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://study.congcong.us/t/214606

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX