From 0c5c7c3446a0917d830579b2f3f7582b759695a3 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Tue, 29 Nov 2016 05:19:47 +0000 Subject: [PATCH] doc: update go1.8.html after feedback from Russ Address Russ's feedback from https://golang.org/cl/33244 TBR=See https://golang.org/cl/33244 Updates #17929 Change-Id: I708d71f519f6414ecec629d3c273d9e737d8ed50 Reviewed-on: https://go-review.googlesource.com/33656 Reviewed-by: Brad Fitzpatrick --- doc/go1.8.html | 281 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 197 insertions(+), 84 deletions(-) diff --git a/doc/go1.8.html b/doc/go1.8.html index 9080840fc2..de00f2567e 100644 --- a/doc/go1.8.html +++ b/doc/go1.8.html @@ -43,12 +43,12 @@ and simplifies sorting slices.

When explicitly converting structs, tags are now ignored for structural type identity. - See change 24190 for details. + See language specification for details.

The language specification now only requires that implementations - support up to 16-bit exponents in constants. This does not affect + support up to 16-bit exponents in floating-point constants. This does not affect either the gc or gccgo compilers, both of which still support 32-bit exponents.

@@ -107,17 +107,96 @@ and VMOVSLDUP.

For 64-bit PPC systems, the common vector scalar instructions have been -added. See change 30510. +added: +LXS, +LXSDX, +LXSI, +LXSIWAX, +LXSIWZX, +LXV, +LXVD2X, +LXVDSX, +LXVW4X, +MFVSR, +MFVSRD, +MFVSRWZ, +MTVSR, +MTVSRD, +MTVSRWA, +MTVSRWZ, +STXS, +STXSDX, +STXSI, +STXSIWX, +STXV, +STXVD2X, +STXVW4X, +XSCV, +XSCVDPSP, +XSCVDPSPN, +XSCVDPSXDS, +XSCVDPSXWS, +XSCVDPUXDS, +XSCVDPUXWS, +XSCVSPDP, +XSCVSPDPN, +XSCVSXDDP, +XSCVSXDSP, +XSCVUXDDP, +XSCVUXDSP, +XSCVX, +XSCVXP, +XVCV, +XVCVDPSP, +XVCVDPSXDS, +XVCVDPSXWS, +XVCVDPUXDS, +XVCVDPUXWS, +XVCVSPDP, +XVCVSPSXDS, +XVCVSPSXWS, +XVCVSPUXDS, +XVCVSPUXWS, +XVCVSXDDP, +XVCVSXDSP, +XVCVSXWDP, +XVCVSXWSP, +XVCVUXDDP, +XVCVUXDSP, +XVCVUXWDP, +XVCVUXWSP, +XVCVX, +XVCVXP, +XXLAND, +XXLANDC, +XXLANDQ, +XXLEQV, +XXLNAND, +XXLNOR, +XXLOR, +XXLORC, +XXLORQ, +XXLXOR, +XXMRG, +XXMRGHW, +XXMRGLW, +XXPERM, +XXPERMDI, +XXSEL, +XXSI, +XXSLDWI, +XXSPLT, and +XXSPLTW.

Yacc

-The yacc (previously available via +The yacc tool (previously available via “go tool yacc”) has been removed. As of Go 1.7 it was no longer used by the Go compiler. It has moved to the “tools” repository and is and is available via -go get golang.org/x/tools/cmd/goyacc. +go get golang.org/x/tools/cmd/goyacc.

Compiler Toolchain

@@ -140,8 +219,8 @@ TODO: ARM binary size & perf numbers.

-The temporary -ssa=0 flag introduced in Go 1.7 to disable -the new backend has been removed in Go 1.8. + The temporary -ssa=0 compiler flag introduced in Go 1.7 + to disable the new backend has been removed in Go 1.8.

@@ -180,13 +259,17 @@ is unchanged, but there are a number of changes worth noting.

-A new “go bug” command helps users file bug reports. + A new + “go + bug” command helps users file bug reports.

Go doc

- The “go doc” command + The + “go + doc” command now groups constants and variables with their type, following the behavior of godoc. @@ -203,14 +286,14 @@ A new “go bug” command helps users file bug report explicitly.

-

Plug-ins

+

Plugins

Go now supports a “plugin” build mode for generating - plug-ins written in Go, and a + plugins written in Go, and a new plugin package for - loading such plug-ins at run time. Plug-ins support is only currently - available on Linux and Darwin. + loading such plugins at run time. Plugin support is only currently + available on Linux and macOS.

Runtime

@@ -256,19 +339,22 @@ packages.

Garbage Collector

-Garbage collection pauses should be significantly shorter than they -were in Go 1.7, often as low as 10 microseconds and usually under 100 -microseconds. -See the - -document on eliminating stop-the-world stack re-scanning for details. -More work remains for Go 1.9. + Garbage collection pauses should be significantly shorter than they + were in Go 1.7, often as low as 10 microseconds and usually under 100 + microseconds. + See the + document on eliminating stop-the-world stack re-scanning + for details. More work remains for Go 1.9.

Defer

-

defer calls are now about twice as fast.

+

+ The overhead of deferred + function calls has been reduced by half. +

Cgo

@@ -375,7 +461,7 @@ in mind. The encoder, when operating in NoCompression mode, now produces a consistent output that is not dependent on - the size of the input buffer to the + the size of the slices passed to the Write method.

@@ -399,7 +485,7 @@ in mind. field is the zero value. In previous releases of Go, the Writer would encode - a non-sensible value. + a nonsensical value. Similarly, the Reader @@ -502,7 +588,10 @@ pkg debug/pe, type StringTable []uint8
encoding/base64

- The new Encoding.Strict method returns an Encoding that causes the decoder to return an error when the trailing padding bits are not zero. + The new + Encoding.Strict + method returns an Encoding that causes the decoder + to return an error when the trailing padding bits are not zero.

@@ -536,14 +625,17 @@ pkg debug/pe, type StringTable []uint8

- Numbers are now formatted in the same floating point format as they are in ES6. + Marshal encodes floating-point numbers using the same format as in ES6, + preferring decimal (not exponential) notation for a wider range of values. + In particular, all floating-point integers up to 264 format the + same as the equivalent int64 representation.

Implementations of Unmarshaler are now called with the literal "null" and can - decide what to do with it. + decide how to handle it.

@@ -593,10 +685,14 @@ pkg debug/pe, type StringTable []uint8
math/rand
-

- There is a new - method Rand.Uint64 - to return uint64 values. +

+ The new Rand.Uint64 + method returns uint64 values. The + new Rand.Source64 + interface describes sources capable of generating such values + directly; otherwise the Rand.Uint64 method + constructs a uint64 from two calls + to Rand.Source's Int63 method.

@@ -628,11 +724,10 @@ pkg debug/pe, type StringTable []uint8
  • The server now supports graceful shutdown support, mentioned above.
  • - The Server now - has new configuration options - ReadHeaderTimeout and IdleTimeout. - The previously ill-defined WriteTimeout is now - documented. + The Server + adds configuration options + ReadHeaderTimeout and IdleTimeout + and documents WriteTimeout.
  • @@ -666,26 +761,28 @@ pkg debug/pe, type StringTable []uint8 support.
  • -
  • There is now a second way to serve trailers - for when the trailer name is not known before the headers are - written (via a call to - to ResponseWriter.WriteHeader). The old way - continues to work, but when the trailer is only known after the - header has been written, see the - new TrailerPrefix.
  • +
  • + To serve trailers known after the header has been written, + see the new + TrailerPrefix + mechanism. +
  • - A Handler now has a supported mechanism to abort a - response: panicking with + A Handler can now abort a response by panicking + with the error ErrAbortHandler.
  • - There is now a supported mechanism to test whether a - ResponseWriter has been hijacked: Write zero bytes to it. - While this previously returned - ErrHijacked, now - it also does so without spamming the server's error log. + A Write of zero bytes to a + ResponseWriter + is now defined as a + way to test whether a ResponseWriter has been hijacked: + if so, the Write returns + ErrHijacked + without printing an error + to the server's error log.
  • @@ -693,16 +790,23 @@ pkg debug/pe, type StringTable []uint8

    Client & Transport changes:

    • - The Client now copies request headers on redirect. + The Client + now copies most request headers on redirect. Authentication-specific + headers are only sent to the same origin or subdomains thereof. + Cookies are not sent again, unless they were set explicitly. + TODO: verify this, and link to docs once https://github.com/golang/go/issues/18096 + is fixed.
    • - The Transport now supports international domain names. + The Transport + now supports international domain names. Consequently, so do + Get and other helpers.
    • The Client now supports 307 and 308 redirects. - If the redirect involves re-sending the request body, + If the redirect requires resending the request body, the request must have the new Request.GetBody field defined. @@ -730,7 +834,7 @@ pkg debug/pe, type StringTable []uint8
    • The DefaultTransport.Dialer - now enables DualStack ("Happy Eyeballs") support, + now enables DualStack ("Happy Eyeballs") support, to use IPv4 as a backup if it looks like IPv6 might be failing.
    • @@ -743,14 +847,22 @@ pkg debug/pe, type StringTable []uint8

      - Empty quoted strings are now allowed in the name part of an - address. That is, this is now a legal address: - "" <gopher@example.com> + Empty quoted strings are once again allowed in the name part of + an address. That is, Go 1.4 and earlier accepted + "" <gopher@example.com>, + but Go 1.5 introduced a bug that rejected this address. + The address is recognized again.

      - The ParseDate - function has been exported. + The + Header.Date + method has always provided a way to parse + the Date: header. + A new function + ParseDate + allows parsing dates found in other + header lines, such as the Resent-Date: header.

      @@ -760,10 +872,12 @@ pkg debug/pe, type StringTable []uint8

      - If implementations of the Auth - interface return an empty toServer value, the package - no longer sends trailing whitespace after the SMTP AUTH - command, which some servers rejected. + If an implementation of + the Auth + interface's Start method returns an + empty toServer value, the package no longer sends + trailing whitespace in the SMTP AUTH command, + which some servers rejected.

      @@ -777,7 +891,7 @@ pkg debug/pe, type StringTable []uint8 and PathUnescape are similar to the query escaping and unescaping functions but - don't treat spaces specially.

      + for path elements.

      The new methods URL.Hostname @@ -796,13 +910,18 @@ pkg debug/pe, type StringTable []uint8

      The URL type now implements encoding.BinaryMarshaler and - encoding.BinaryUnmarshaler. + encoding.BinaryUnmarshaler, + making it possible to process URLs in gob data.

      - Parse now rejects relative URLs containing a ":" in - the first path segment. Such paths should be prefixed with "./". - The URL.String method now prepends "./" to such paths. + Following RFC 3986, + Parse + now rejects URLs like this_that:other/thing instead of + interpreting them as relative paths (this_that is not a valid scheme). + To force interpretation as a relative path, + such URLs should be prefixed with "./". + The URL.String method now inserts this prefix as needed.

      @@ -823,9 +942,7 @@ pkg debug/pe, type StringTable []uint8

      The new function Swapper was - added to support - the new sort.Slice - support. + added to support sort.Slice.

    @@ -836,7 +953,8 @@ pkg debug/pe, type StringTable []uint8

    The Unquote function now strips carriage returns (\r) in - backquoted raw strings. + backquoted raw strings, following the + Go language semantics.

    @@ -849,7 +967,10 @@ pkg debug/pe, type StringTable []uint8 the analogous Since function.

    -

    ParseDuration now accepts long fractional parts.

    +

    + ParseDuration + now accepts long fractional parts. +

    Parse now validates days that are too small, in @@ -886,12 +1007,14 @@ pkg debug/pe, type StringTable []uint8

    The new function CoverMode - reports what the test coverage mode is set to. + reports the test coverage mode.

    Tests and benchmarks are now marked as failed if the race detector is enabled and a data race occurs during execution. + Previously, individual test cases would appear to pass, + and only the overall execution of the test binary would fail.

    @@ -902,17 +1025,7 @@ pkg debug/pe, type StringTable []uint8

    SimpleFold now returns its argument unchanged if the provided input was an invalid rune. -

    - - - - - - -
    foo
    -
    -

    - + Previously, the implementation failed with an index bounds check panic.

    -- 2.50.0