diff --git a/doc/go1.18.html b/doc/go1.18.html index fb0b054e28..4f485143a9 100644 --- a/doc/go1.18.html +++ b/doc/go1.18.html @@ -29,6 +29,66 @@ Do not send CLs removing the interior tags from such phrases. TODO: complete this section
++ Go 1.18 includes an implementation of generic features as described by the + Type + Parameters Proposal. + This includes major - but fully backward-compatible - changes to the language. + The following is a list of the most visible changes. For a more comprehensive overview, see the + proposal. + For details see the language spec. +
+~
is added to the set of
+ operators and punctuation.
+ ~T
type elements. Such interfaces may only be used
+ as type constraints.
+ An interface now defines a set of types as well as a set of methods.
+ any
is an alias for the empty interface. It may be used instead of
+ interface{}
.
+ comparable
is an interface the denotes the set of all types which can be
+ compared using ==
or !=
. It may only be used as (or embedded in)
+ a type constraint.
+ + The current generics implementation has the following limitations: +
@@ -56,24 +116,6 @@ Do not send CLs removing the interior tags from such phrases. programs is likely very small.
-- Go 1.18 includes an implementation of generics as described - by the - generics proposal. -
- -- The current generics implementation has the following limitations: -