From fa0484640479a26687608706c9f6628eac1174d2 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Mon, 7 Feb 2022 10:02:30 -0800 Subject: [PATCH] doc/go1.18: mention new x/exp generic packages Change-Id: I119cfb1a0da9af89ced78935b8fcdfdb8d9b4ab6 Reviewed-on: https://go-review.googlesource.com/c/go/+/383794 Trust: Ian Lance Taylor Reviewed-by: Robert Griesemer --- doc/go1.18.html | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/doc/go1.18.html b/doc/go1.18.html index 4d77f14d53..7e11f73820 100644 --- a/doc/go1.18.html +++ b/doc/go1.18.html @@ -90,6 +90,39 @@ Do not send CLs removing the interior tags from such phrases. +

+ 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. +

+
golang.org/x/exp/constraints
+
+

+ Constraints that are useful for generic code, such as + constraints.Ordered. +

+
+ +
golang.org/x/exp/slices
+
+

+ A collection of generic functions that operate on slices of + any element type. +

+
+ +
golang.org/x/exp/maps
+
+

+ A collection of generic functions that operate on maps of + any key or element type. +

+
+
+

+

The current generics implementation has the following limitations: