diff options
author | Austin Clements <austin@google.com> | 2021-12-06 13:33:54 -0500 |
---|---|---|
committer | Austin Clements <austin@google.com> | 2021-12-06 19:50:32 +0000 |
commit | 9ecb853cf2252f3cd9ed2e7b3401d17df2d1ab06 (patch) | |
tree | 86b854eae30ffdd0a09ee20d3e18ba59a50c1cec /doc | |
parent | 765cc726b64044a55fb37d10a8bec1c153b06be5 (diff) | |
download | go-9ecb853cf2252f3cd9ed2e7b3401d17df2d1ab06.tar.gz go-9ecb853cf2252f3cd9ed2e7b3401d17df2d1ab06.zip |
doc/go1.18: minor tweaks to generics section
This CL reorders the bullet points in the generics section to more
closely match what I think users will consider most important. I put
the ~ token before the mention of ~T in interfaces to avoid a forward
reference, though I wonder if we actually want to spent a couple more
sentences saying what union and ~T types are, since most people are
going to care about that a lot more than they care about the low-level
detail that there's a new token.
For #47694.
Change-Id: Ib84f096ef6346a711801268ce362b64fa423d3f2
Reviewed-on: https://go-review.googlesource.com/c/go/+/369734
Trust: Austin Clements <austin@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/go1.18.html | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/doc/go1.18.html b/doc/go1.18.html index e4e0d2300d..15cec4e1f0 100644 --- a/doc/go1.18.html +++ b/doc/go1.18.html @@ -42,10 +42,6 @@ Do not send CLs removing the interior tags from such phrases. </p> <ul> <li> - The new token <code>~</code> is added to the set of - <a href="https://golang.org/ref/spec#Operators_and_punctuation">operators and punctuation</a>. - </li> - <li> The syntax for <a href="https://golang.org/ref/spec#Function_declarations">Function</a> and <a href="https://golang.org/ref/spec#Type_declarations">type declarations</a> @@ -53,6 +49,14 @@ Do not send CLs removing the interior tags from such phrases. <a href="https://golang.org/ref/spec#Type_parameters">type parameters</a>. </li> <li> + Parameterized functions and types can be instantiated by following them with a list of + type arguments in square brackets. + </li> + <li> + The new token <code>~</code> has been added to the set of + <a href="https://golang.org/ref/spec#Operators_and_punctuation">operators and punctuation</a>. + </li> + <li> The syntax for <a href="https://golang.org/ref/spec#Interface_types">Interface types</a> now permits the embedding of arbitrary types (not just type names of interfaces) @@ -61,10 +65,6 @@ Do not send CLs removing the interior tags from such phrases. An interface now defines a set of types as well as a set of methods. </li> <li> - Parameterized functions and types can be instantiated by following them with a list of - type arguments in square brackets. - </li> - <li> The new <a href="https://golang.org/ref/spec#Predeclared_identifiers">predeclared identifier</a> <code>any</code> is an alias for the empty interface. It may be used instead of |