diff options
author | Robert Griesemer <gri@golang.org> | 2022-03-09 18:36:53 -0800 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2022-03-11 06:00:14 +0000 |
commit | 59d80227effa3027a37b1aa85eef88d1df7b1e81 (patch) | |
tree | 1feaa7423d0660ca270aecf85b018f25c8e21925 /doc | |
parent | 751b8798dd3a0b099ec403bafae0d48d5c5fae8c (diff) | |
download | go-git-59d80227effa3027a37b1aa85eef88d1df7b1e81.tar.gz |
spec: clean up intro and replace bolded text with prose
- Remove "Draft" disclaimer. We're not done but the spec
is in usable shape with respect to generics features.
- Remove section on "Earlier version" and fold information
into the "Intro" section.
- Remove caveat for shifts: the rules for arithmetic operators
on type parameters apply for them as well.
- Simply state that we don't support arguments of type parameter
type for the built-ins real, imag, and complex.
Fixes #51182.
Change-Id: I6df1427de685cfe7055b64e91753aa7ebff70565
Reviewed-on: https://go-review.googlesource.com/c/go/+/391695
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/go_spec.html | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/doc/go_spec.html b/doc/go_spec.html index d241dada72..9b37e0ded0 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -1,21 +1,16 @@ <!--{ - "Title": "The Go Programming Language Specification - Go 1.18 Draft", - "Subtitle": "Version of March 9, 2022", + "Title": "The Go Programming Language Specification", + "Subtitle": "Version of March 10, 2022", "Path": "/ref/spec" }--> -<h2>Earlier version</h2> - -<p> -For the pre-Go1.18 specification without generics support see -<a href="/doc/go1.17_spec.html">The Go Programming Language Specification</a>. -</p> - <h2 id="Introduction">Introduction</h2> <p> -This is a reference manual for the Go programming language. For -more information and other documents, see <a href="/">golang.org</a>. +This is the reference manual for the Go programming language. +The pre-Go1.18 version, without generics, can be found +<a href="/doc/go1.17_spec.html">here</a>. +For more information and other documents, see <a href="/">golang.org</a>. </p> <p> @@ -4668,10 +4663,6 @@ and the other operand is not, the constant is implicitly <a href="#Conversions"> to the type of the other operand. </p> -<p><b> -[The rules for shifts need adjustments for type parameters. Issue #51182.] -</b></p> - <p> The right operand in a shift expression must have <a href="#Numeric_types">integer type</a> or be an untyped constant <a href="#Representability">representable</a> by a @@ -7257,10 +7248,6 @@ does not exist, <code>delete</code> is a no-op. <h3 id="Complex_numbers">Manipulating complex numbers</h3> -<p><b> -[We don't support generic arguments for these built-ins for Go 1.18.] -</b></p> - <p> Three functions assemble and disassemble complex numbers. The built-in function <code>complex</code> constructs a complex @@ -7323,6 +7310,10 @@ const c = imag(b) // untyped constant -1.4 _ = imag(3 << s) // illegal: 3 assumes complex type, cannot shift </pre> +<p> +Arguments of type parameter type are not permitted. +</p> + <h3 id="Handling_panics">Handling panics</h3> <p> Two built-in functions, <code>panic</code> and <code>recover</code>, |