]> Cypherpunks repositories - gostls13.git/commitdiff
doc/go1.18: minor tweaks to generics section
authorAustin Clements <austin@google.com>
Mon, 6 Dec 2021 18:33:54 +0000 (13:33 -0500)
committerAustin Clements <austin@google.com>
Mon, 6 Dec 2021 19:50:32 +0000 (19:50 +0000)
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>
doc/go1.18.html

index e4e0d2300d471d4301292ceaf9a28bed39e07d94..15cec4e1f06bb8a5d93530d0238a115c92997635 100644 (file)
@@ -41,10 +41,6 @@ Do not send CLs removing the interior tags from such phrases.
   For details see the <a href="https://golang.org/ref/spec">language spec</a>.
 </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
@@ -52,6 +48,14 @@ Do not send CLs removing the interior tags from such phrases.
     now accepts
     <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>
@@ -60,10 +64,6 @@ Do not send CLs removing the interior tags from such phrases.
     as type constraints.
     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>