]> Cypherpunks repositories - gostls13.git/commitdiff
doc/go1.18: warn about possible breakage of 1.18 generic code
authorIan Lance Taylor <iant@golang.org>
Mon, 28 Feb 2022 18:19:43 +0000 (10:19 -0800)
committerCarlos Amedee <carlos@golang.org>
Wed, 2 Mar 2022 20:14:06 +0000 (20:14 +0000)
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>
doc/go1.18.html

index 1ca0a5560dfe333e4258adbef039e53d94d56dbc..524fa0495b8509938af5012623b36ae21e8ea364 100644 (file)
@@ -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>.