6. 语言级并行 并发性是能够同时执行多个计算结果。现在并发性已经成为衡量一个语言的关键特性,Go语言就是基因里面支持的并发,可以充分的利用多核,很容易的使用并发。 7. 代码风格 - gofmt 通过谷歌的页面可以看见Go语言里面内置了很多工具链,最好的应该是gofmt工具,自动化格式化代码,能够让团队review变得如此的简单,代码格式一模一样,想不一样都很困难 8.内置文档 - godoc 企业中API和程序的相互协作以及和第三方协作是非常重要的,Go语言可以建立一个代码的内置文档-godoc,可以分享将资源在代码中进行分享。 9.自动垃圾回收 在C和c++程序员花费很多的时间和精力分配和释放内存,R语言则可以消除这种情况,确保程序员可以集中精力进行更多的生产任务。当然垃圾收集也有自身的问题,不过这些都是通过语言来实现的,不需要程序员进行额外的工作。 10. 丰富的库 一个丰富的库对于任何一种语言都是非常重要的,可以通过 the list of packages in Go查看Go语言的库,包括压缩、加密、大量的数据结构、SQL语句、JSON和XML解析、模板、网络等等。 11. 有趣的语言,低门槛学习条件 有一些优秀的程序员可以学习多种语言,他们是非常优秀的。但是作为一个普通人,学习语言还是很痛苦的,但是Go语言有C的基因,学习门槛很低,但是表达能力很强大,几乎支持大多数你在其他语言见过的特性:继承、重载、对象等。 "After Go, programming in anything else seems as difficult as balancing the State of California’s budget." — Charles Thompson 12. 经过线上大规模考验的成功案例 我研究越多,越让我印象深刻。还有很多好处我没有列出来,因为实在是太多了。通过一些具体的案例来展示一下吧。
iron.io"In retrospect, it was a great decision to choose Go as it's allowed us to build great products, to grow and scale, and attract grade A talent." — Read Case Study bitly.com"We identified early on that Go had all the makings of a language that could supersede some of the places we would have traditionally turned to C and some of the places where we wanted to move away from Python." — Read Case Study torbit.com"We process over 6 billion performance metrics a day and our goal is to keep our customers’ data safe forever." — Read Case Study conformal.com"In summary, Go makes hacking fun again by doing away with intellectual masturbation and terrible, terrible tools. It compiles super fast and runs at native speeds. Any C expert can pick it up over the course of a few weeks and with its awesome data representation features I believe we could rewrite a product such asCyphertite in 25% as many lines of code." — Read Case Study原文链接:12 Benefits of Golang For Enterprise Systems |