Movatterモバイル変換


[0]ホーム

URL:


  1. Documentation
  2. Go 1 and the Future of Go Programs

Go 1 and the Future of Go Programs

Introduction

The release of Go version 1, Go 1 for short, is a major milestonein the development of the language. Go 1 is a stable platform forthe growth of programs and projects written in Go.

Go 1 defines two things: first, the specification of the language;and second, the specification of a set of core APIs, the "standardpackages" of the Go library. The Go 1 release includes theirimplementation in the form of two compiler suites (gc and gccgo),and the core libraries themselves.

It is intended that programs written to the Go 1 specification willcontinue to compile and run correctly, unchanged, over the lifetimeof that specification. At some indefinite point, a Go 2 specificationmay arise, but until that time, Go programs that work today shouldcontinue to work even as future "point" releases of Go 1 arise (Go1.1, Go 1.2, etc.).

Compatibility is at the source level. Binary compatibility forcompiled packages is not guaranteed between releases. After a pointrelease, Go source will need to be recompiled to link against thenew release.

The APIs may grow, acquiring new packages and features, but not ina way that breaks existing Go 1 code.

Expectations

Although we expect that the vast majority of programs will maintainthis compatibility over time, it is impossible to guarantee thatno future change will break any program. This document is an attemptto set expectations for the compatibility of Go 1 software in thefuture. There are a number of ways in which a program that compilesand runs today may fail to do so after a future point release. Theyare all unlikely but worth recording.

Of course, for all of these possibilities, should they arise, wewould endeavor whenever feasible to update the specification,compilers, or libraries without affecting existing code.

These same considerations apply to successive point releases. Forinstance, code that runs under Go 1.2 should be compatible with Go1.2.1, Go 1.3, Go 1.4, etc., although not necessarily with Go 1.1since it may use features added only in Go 1.2

Features added between releases, available in the source repositorybut not part of the numbered binary releases, are under activedevelopment. No promise of compatibility is made for software usingsuch features until they have been released.

Finally, although it is not a correctness issue, it is possiblethat the performance of a program may be affected bychanges in the implementation of the compilers or libraries uponwhich it depends.No guarantee can be made about the performance of agiven program between releases.

Although these expectations apply to Go 1 itself, we hope similarconsiderations would be made for the development of externallydeveloped software based on Go 1.

Sub-repositories

Code in sub-repositories of the main go tree, such asgolang.org/x/net,may be developed underlooser compatibility requirements. However, the sub-repositorieswill be tagged as appropriate to identify versions that are compatiblewith the Go 1 point releases.

Operating systems

It is impossible to guarantee long-term compatibility with operatingsystem interfaces, which are changed by outside parties.Thesyscall packageis therefore outside the purview of the guarantees made here.As of Go version 1.4, thesyscall package is frozen.Any evolution of the system call interface must be supported elsewhere,such as in thego.sys subrepository.For details and background, seethis document.

Tools

Finally, the Go toolchain (compilers, linkers, build tools, and soon) is under active development and may change behavior. Thismeans, for instance, that scripts that depend on the location andproperties of the tools may be broken by a point release.

These caveats aside, we believe that Go 1 will be a firm foundationfor the development of Go and its ecosystem.

go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp