mirror of https://github.com/golang/go.git
doc/go1.18: warn about possible breakage of 1.18 generic code
The Go 1 compatibility guarantee permits us to break code if there is a specification error or a bug. Emphasize that for generics. Change-Id: I8379a14cdab9f63bb747e961ca12d1adecfc2eb4 Reviewed-on: https://go-review.googlesource.com/c/go/+/388454 Trust: Ian Lance Taylor <iant@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com> Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
parent
9eb14f1b0e
commit
2cb9e116d3
|
|
@ -45,6 +45,26 @@ Do not send CLs removing the interior tags from such phrases.
|
|||
generic code in production.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
While we believe that the new language features are well designed
|
||||
and clearly specified, it is possible that we have made mistakes.
|
||||
We want to stress that the <a href="/doc/go1compat">Go 1
|
||||
compatibility guarantee</a> says "If it becomes necessary to address
|
||||
an inconsistency or incompleteness in the specification, resolving
|
||||
the issue could affect the meaning or legality of existing
|
||||
programs. We reserve the right to address such issues, including
|
||||
updating the implementations." It also says "If a compiler or
|
||||
library has a bug that violates the specification, a program that
|
||||
depends on the buggy behavior may break if the bug is fixed. We
|
||||
reserve the right to fix such bugs." In other words, it is possible
|
||||
that there will be code using generics that will work with the 1.18
|
||||
release but break in later releases. We do not plan or expect to
|
||||
make any such change. However, breaking 1.18 programs in future
|
||||
releases may become necessary for reasons that we cannot today
|
||||
foresee. We will minimize any such breakage as much as possible, but
|
||||
we can't guarantee that the breakage will be zero.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The following is a list of the most visible changes. For a more comprehensive overview, see the
|
||||
<a href="https://go.googlesource.com/proposal/+/refs/heads/master/design/43651-type-parameters.md">proposal</a>.
|
||||
|
|
|
|||
Loading…
Reference in New Issue