GO 2,我們來了——2018/11/29
ofollow,noindex">Go 2, here we come!
29 November 2018
道法自然,學究天人。論英語與Golang的長天一色,得翻譯和技術之並駕齊驅。
背景(Background)
At GopherCon 2017, Russ Cox officially started the thought process on the next big version of Go with his talkThe Future of Go (blog post ). We have called this future language informally Go 2, even though we understand now that it will arrive in incremental steps rather than with a big bang and a single major release. Still, Go 2 is a useful moniker, if only to have a way to talk about that future language, so let’s keep using it for now.
A major difference between Go 1 and Go 2 is who is going to influence the design and how decisions are made. Go 1 was a small team effort with modest outside influence; Go 2 will be much more community-driven. After almost 10 years of exposure, we have learned a lot about the language and libraries that we didn’t know in the beginning, and that was only possible through feedback from the Go community.
In 2015 we introduced theproposal process to gather a specific kind of feedback: proposals for language and library changes. A committee composed of senior Go team members has been reviewing, categorizing, and deciding on incoming proposals on a regular basis. That has worked pretty well, but as part of that process we have ignored all proposals that are not backward-compatible, simply labeling them Go 2 instead. In 2017 we also stopped making any kind of incremental backward-compatible language changes, however small, in favor of a more comprehensive plan that takes the bigger picture of Go 2 into account.
It is now time to act on the Go 2 proposals, but to do this we first need a plan.
在2017年的GopherCon(Go語言年終總結大會)上,Russ Cox(拉斯•考克斯)正式地開始了他關於Go的下一個大版本的思考過程,並發表了《Go的未來》的演講。我們非正式地把這個將來的語言叫做Go 2,雖然我們現在知道它將以漸進的腳步而不是以一個大爆炸和單一主要的版本來發布。然而,如果僅僅是有一個討論這個未來的語言方式,Go 2是一個好用的別名,所以現在讓我們就這麼叫它吧。
Go 1和Go 2的一個主要的變化就是誰將影響設計和如何做出決策。Go 1是一個小團隊的努力,外部影響不大; Go 2將會更多是社群驅動。經過了至少十年的曝光,我們學到了很多我們剛開始並不知道的關於語言和庫的知識,而且,這也僅僅是通過社群的反饋才有可能的。
在2015年,我們介紹了提案流程來收集特定型別的反饋:語言和庫的變更提案。一個由高階Go團隊成員組成的委員會一直在定期審閱,分類和決定提交的提案。它工作的相當好,但是作為該過程的一部分,我們無視了所有向下相容的提案,簡單的標記了他們將在Go 2被實現。在2017年,我們也停止了進行任何型別的漸進式向下相容的語言變更,無論多麼小,都有利於打造一個更全面的將Go 2的大局考慮在內的計劃。
現在是時候去實現Go 2的提案了,但是想要做到這些,我們首先需要有一個計劃。
狀態(status)
At the time of writing, there are around 120open issues labeled Go 2 proposal . Each of them proposes a significant library or language change, often one that does not satisfy the existingGo 1 compatibility guarantee . Ian Lance Taylor and I have been working through these proposals and categorized them (Go2Cleanup ,NeedsDecision , etc.) to get an idea of what’s there and to make it easier to proceed with them. We also merged related proposals and closed the ones which seemed clearly out of the scope of Go, or were otherwise unactionable.
Ideas from the remaining proposals will likely influence Go 2’s libraries and languages. Two major themes have emerged early on: support for better error handling, and generics.Draft designs for these two areas have been published at this year’s GopherCon, and more exploration is needed.
But what about the rest? We areconstrained by the fact that we now have millions of Go programmers and a large body of Go code, and we need to bring it all along, lest we risk a split ecosystem. That means we cannot make many changes, and the changes we are going to make need to be chosen carefully. To make progress, we are implementing a new proposal evaluation process for these significant potential changes.
在寫這篇文章的時候,已經有大約120個標記了Go 2的提案被開啟。