]> Cypherpunks repositories - gostls13.git/commitdiff
doc/go1.18: mention new x/exp generic packages
authorIan Lance Taylor <iant@golang.org>
Mon, 7 Feb 2022 18:02:30 +0000 (10:02 -0800)
committerIan Lance Taylor <iant@golang.org>
Mon, 7 Feb 2022 18:09:07 +0000 (18:09 +0000)
Change-Id: I119cfb1a0da9af89ced78935b8fcdfdb8d9b4ab6
Reviewed-on: https://go-review.googlesource.com/c/go/+/383794
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
doc/go1.18.html

index 4d77f14d537968a6c95928f150e70d8a2501ea74..7e11f73820bd8b2417ac246253d4c55fe5388dda 100644 (file)
@@ -90,6 +90,39 @@ Do not send CLs removing the interior tags from such phrases.
   </li>
 </ul>
 
+<p>
+  There are three experimental packages using generics that may be
+  useful.
+  These packages are in x/exp repository; their API is not covered by
+  the Go 1 guarantee and may change as we gain more experience with
+  generics.
+  <dl>
+    <dt><a href="https://pkg.go.dev/golang.org/x/exp/constraints"><code>golang.org/x/exp/constraints</code></a></dt>
+    <dd>
+      <p>
+       Constraints that are useful for generic code, such as
+       <a href="https://pkg.go.dev/golang.org/x/exp/constraints#Ordered"><code>constraints.Ordered</code></a>.
+      </p>
+    </dd>
+
+    <dt><a href="https://pkg.go.dev/golang.org/x/exp/slices"><code>golang.org/x/exp/slices</code></a></dt>
+    <dd>
+      <p>
+       A collection of generic functions that operate on slices of
+       any element type.
+      </p>
+    </dd>
+
+    <dt><a href="https://pkg.go.dev/golang.org/x/exp/maps"><code>golang.org/x/exp/maps</code></a></dt>
+    <dd>
+      <p>
+       A collection of generic functions that operate on maps of
+       any key or element type.
+      </p>
+    </dd>
+  </dl>
+</p>
+
 <p>
   The current generics implementation has the following limitations:
   <ul>