<commit_before><!--{
	"Title": "Go 1.9 Release Notes",
	"Path":  "/doc/go1.9",
	"Template": true
}-->

<!--
NOTE: In this document and others in this directory, the convention is to
set fixed-width phrases with non-fixed-width spaces, as in
<code>hello</code> <code>world</code>.
Do not send CLs removing the interior tags from such phrases.
-->

<style>
ul li { margin: 0.5em 0; }
</style>

<h2 id="introduction">DRAFT RELEASE NOTES - Introduction to Go 1.9</h2>

<p><strong>
    Go 1.9 is not yet released. These are work-in-progress
    release notes. Go 1.9 is expected to be released in August 2017.
</strong></p>

<p>
  The latest Go release, version 1.9, arrives six months after <a href="go1.8">Go 1.8</a>
  and is the tenth release in the <a href="https://golang.org/doc/devel/release.html">Go 1.x series</a>.
  Most of its changes are in the implementation of the toolchain, runtime, and libraries.
  There are no changes to the language specification.
  As always, the release maintains the Go 1 <a href="/doc/go1compat.html">promise of compatibility</a>.
  We expect almost all Go programs to continue to compile and run as before.
</p>

<p>
  The release
  adds <a href="#monotonic-time">transparent monotonic time support</a>,
  <a href="#parallel-compile">parallelizes compilation of functions</a> within a package,
  better supports <a href="#test-helper">test helper functions</a>,
  and includes a new <a href="#math-bits">bit manipulation package</a>.
</p>

<h2 id="ports">Ports</h2>

<p>
  There are no new supported operating systems or processor
  architectures in this release.
</p>

<h3 id="power8">ppc64x requires Power8</h3>

<p> <!-- CL 36725, CL 36832 -->
  Both <code>GOARCH=ppc64</code> and <code>GOARCH=ppc64le</code> now
  require at least Power8 support. In previous releases,
  only <code>GOARCH=ppc64le</code> required Power8 and the big
  endian <code>ppc64</code> architecture supported older
  hardware.
<p>

<h3 id="known_issues">Known Issues</h3>

<p>
  There are some instabilities on FreeBSD that are known but not understood.
  These can lead to program crashes in rare cases.
  See <a href="https://golang.org/issue/15658">issue 15658</a>.
  Any help in solving this FreeBSD-specific issue would be appreciated.
</p>

<h2 id="tools">Tools</h2>

<h3 id="parallel-compile">Parallel Compilation</h3>

<p>
  The Go compiler now supports compiling a package's functions in parallel, taking
  advantage of multiple cores. This is in addition to the <code>go</code> command's
  existing support for parallel compilation of separate packages.
  Parallel compilation is on by default, but can be disabled by setting the
  environment variable <code>GO19CONCURRENTCOMPILATION</code> to <code>0</code>.
</p>

<!-- CL 42028: https://golang.org/cl/42028: cmd/asm: fix operand order of ARM's MULA instruction -->
<!-- CL 36031: https://golang.org/cl/36031: cmd/doc: truncate long lists of arguments -->
<!-- CL 38438: https://golang.org/cl/38438: cmd/doc: implement "go doc struct.field" -->
<!-- CL 38745: https://golang.org/cl/38745: cmd/go: exclude vendored packages from ... matches -->
<!-- CL 38757: https://golang.org/cl/38757: cmd/go: add -json flag to go env -->
<!-- CL 40112: https://golang.org/cl/40112: cmd/go: allow full flag processing in go vet -->
<!-- CL 43855: https://golang.org/cl/43855: cmd/go: include GOARM and GO386 in computed build ID -->
<!-- CL 44210: https://golang.org/cl/44210: cmd/internal/dwarf: update to DWARF4, emit frame_base -->
<!-- CL 42990: https://golang.org/cl/42990: cmd/internal/obj/x86: add ADDSUBPS/PD -->
<!-- CL 36983: https://golang.org/cl/36983: cmd/link: write dwarf sections -->
<!-- CL 40331: https://golang.org/cl/40331: cmd/link,runtime/cgo: enable PT_TLS generation on OpenBSD -->
<!-- CL 38343: https://golang.org/cl/38343: cmd/pprof: use proxy from environment -->
<!-- CL 36015: https://golang.org/cl/36015: cmd/trace: Record mark assists in execution traces -->


<h2 id="performance">Performance</h2>

<p>
  As always, the changes are so general and varied that precise
  statements about performance are difficult to make.  Most programs
  should run a bit faster, due to speedups in the garbage collector,
  better generated code, and optimizations in the core library.
</p>

<p>
  TODO: There have been significant optimizations bringing more than 10% improvements
  to implementations in the
  <a href="/pkg/foo/"><code>foo</code></a>,
  <a href="/pkg/bar/"><code>bar</code></a>,
  and
  <a href="/pkg/quux/"><code>quux</code></a>
  packages.
</p>

<h3 id="gc">Garbage Collector</h3>

<p>
  TODO(austin): give update.
</p>

<h2 id="library">Core library</h2>

<h3 id="monotonic-time">Transparent Monotonic Time support</h3>

<p> <!-- CL 36255 -->
  The <a href="/pkg/time/"><code>time</code></a> package now transparently
  tracks monotonic time in each <a href="/pkg/time/#Time"><code>Time</code></a>
  value, making computing durations between two <code>Time</code> values
  a safe operation in the presence of wall clock adjustments.
  See the <a href="/pkg/time/#hdr-Monotonic_Clocks">package docs</a> and
  <a href="https://golang.org/design/12914-monotonic">design document</a>
  for details.
</p>

<h3 id="math-bits">New bit manipulation package</h3>

<p>
  Go 1.9 includes a new package,
  <a href="/pkg/math/bits/"><code>math/bits</code></a>, with optimized
  implementations for manipulating bits. On most architectures
  functions in this package are additionally recognized by the
  compiler and treated as intrinsics for additional performance.
</p>

<h3 id="test-helper">Test Helper Functions</h3>

<p> <!-- CL 38796 -->
  The
  new <a href="/pkg/testing/#T.Helper"><code>(*T).Helper</code></a>
  an <a href="/pkg/testing/#B.Helper"><code>(*B).Helper</code></a>
  methods marks the calling function as a test helper function.  When
  printing file and line information, that function will be skipped.
  This permits writing test helper functions while still having useful
  line numbers for users.
</p>

<h3 id="minor_library_changes">Minor changes to the library</h3>

<p>
  As always, there are various minor changes and updates to the library,
  made with the Go 1 <a href="/doc/go1compat">promise of compatibility</a>
  in mind.
</p><commit_msg>doc: add type aliases to go1.9.html<commit_after><!--{
	"Title": "Go 1.9 Release Notes",
	"Path":  "/doc/go1.9",
	"Template": true
}-->

<!--
NOTE: In this document and others in this directory, the convention is to
set fixed-width phrases with non-fixed-width spaces, as in
<code>hello</code> <code>world</code>.
Do not send CLs removing the interior tags from such phrases.
-->

<style>
ul li { margin: 0.5em 0; }
</style>

<h2 id="introduction">DRAFT RELEASE NOTES - Introduction to Go 1.9</h2>

<p><strong>
    Go 1.9 is not yet released. These are work-in-progress
    release notes. Go 1.9 is expected to be released in August 2017.
</strong></p>

<p>
  The latest Go release, version 1.9, arrives six months
  after <a href="go1.8">Go 1.8</a> and is the tenth release in
  the <a href="https://golang.org/doc/devel/release.html">Go 1.x
  series</a>.
  There is one <a href="#language">change to the language</a>, adding
  support for type aliases.
  Most of the changes are in the implementation of the toolchain,
  runtime, and libraries.
  As always, the release maintains the Go 1
  <a href="/doc/go1compat.html">promise of compatibility</a>.
  We expect almost all Go programs to continue to compile and run as
  before.
</p>

<p>
  The release
  adds <a href="#monotonic-time">transparent monotonic time support</a>,
  <a href="#parallel-compile">parallelizes compilation of functions</a> within a package,
  better supports <a href="#test-helper">test helper functions</a>,
  and includes a new <a href="#math-bits">bit manipulation package</a>.
</p>

<h2 id="language">Changes to the language</h2>

<p>
  There is one change to the language.
  Go now supports type aliases to support gradual code repair while
  moving a type between packages.
  The <a href="https://golang.org/design/18130-type-alias">type alias
  design document</a>
  and <a href="https://talks.golang.org/2016/refactor.article">an
  article on refactoring</a> cover the problem in detail.
  In short, a type alias declaration has the form:
</p>

<pre>
type T1 = T2
</pre>

<p>
  This declaration introduces an alias name <code>T1</code>—an
  alternate spelling—for the type denoted by <code>T2</code>; that is,
  both <code>T1</code> and <code>T2</code> denote the same type.
</p>

<h2 id="ports">Ports</h2>

<p>
  There are no new supported operating systems or processor
  architectures in this release.
</p>

<h3 id="power8">ppc64x requires Power8</h3>

<p> <!-- CL 36725, CL 36832 -->
  Both <code>GOARCH=ppc64</code> and <code>GOARCH=ppc64le</code> now
  require at least Power8 support. In previous releases,
  only <code>GOARCH=ppc64le</code> required Power8 and the big
  endian <code>ppc64</code> architecture supported older
  hardware.
<p>

<h3 id="known_issues">Known Issues</h3>

<p>
  There are some instabilities on FreeBSD that are known but not understood.
  These can lead to program crashes in rare cases.
  See <a href="https://golang.org/issue/15658">issue 15658</a>.
  Any help in solving this FreeBSD-specific issue would be appreciated.
</p>

<h2 id="tools">Tools</h2>

<h3 id="parallel-compile">Parallel Compilation</h3>

<p>
  The Go compiler now supports compiling a package's functions in parallel, taking
  advantage of multiple cores. This is in addition to the <code>go</code> command's
  existing support for parallel compilation of separate packages.
  Parallel compilation is on by default, but can be disabled by setting the
  environment variable <code>GO19CONCURRENTCOMPILATION</code> to <code>0</code>.
</p>

<!-- CL 42028: https://golang.org/cl/42028: cmd/asm: fix operand order of ARM's MULA instruction -->
<!-- CL 36031: https://golang.org/cl/36031: cmd/doc: truncate long lists of arguments -->
<!-- CL 38438: https://golang.org/cl/38438: cmd/doc: implement "go doc struct.field" -->
<!-- CL 38745: https://golang.org/cl/38745: cmd/go: exclude vendored packages from ... matches -->
<!-- CL 38757: https://golang.org/cl/38757: cmd/go: add -json flag to go env -->
<!-- CL 40112: https://golang.org/cl/40112: cmd/go: allow full flag processing in go vet -->
<!-- CL 43855: https://golang.org/cl/43855: cmd/go: include GOARM and GO386 in computed build ID -->
<!-- CL 44210: https://golang.org/cl/44210: cmd/internal/dwarf: update to DWARF4, emit frame_base -->
<!-- CL 42990: https://golang.org/cl/42990: cmd/internal/obj/x86: add ADDSUBPS/PD -->
<!-- CL 36983: https://golang.org/cl/36983: cmd/link: write dwarf sections -->
<!-- CL 40331: https://golang.org/cl/40331: cmd/link,runtime/cgo: enable PT_TLS generation on OpenBSD -->
<!-- CL 38343: https://golang.org/cl/38343: cmd/pprof: use proxy from environment -->
<!-- CL 36015: https://golang.org/cl/36015: cmd/trace: Record mark assists in execution traces -->


<h2 id="performance">Performance</h2>

<p>
  As always, the changes are so general and varied that precise
  statements about performance are difficult to make.  Most programs
  should run a bit faster, due to speedups in the garbage collector,
  better generated code, and optimizations in the core library.
</p>

<p>
  TODO: There have been significant optimizations bringing more than 10% improvements
  to implementations in the
  <a href="/pkg/foo/"><code>foo</code></a>,
  <a href="/pkg/bar/"><code>bar</code></a>,
  and
  <a href="/pkg/quux/"><code>quux</code></a>
  packages.
</p>

<h3 id="gc">Garbage Collector</h3>

<p>
  TODO(austin): give update.
</p>

<h2 id="library">Core library</h2>

<h3 id="monotonic-time">Transparent Monotonic Time support</h3>

<p> <!-- CL 36255 -->
  The <a href="/pkg/time/"><code>time</code></a> package now transparently
  tracks monotonic time in each <a href="/pkg/time/#Time"><code>Time</code></a>
  value, making computing durations between two <code>Time</code> values
  a safe operation in the presence of wall clock adjustments.
  See the <a href="/pkg/time/#hdr-Monotonic_Clocks">package docs</a> and
  <a href="https://golang.org/design/12914-monotonic">design document</a>
  for details.
</p>

<h3 id="math-bits">New bit manipulation package</h3>

<p>
  Go 1.9 includes a new package,
  <a href="/pkg/math/bits/"><code>math/bits</code></a>, with optimized
  implementations for manipulating bits. On most architectures
  functions in this package are additionally recognized by the
  compiler and treated as intrinsics for additional performance.
</p>

<h3 id="test-helper">Test Helper Functions</h3>

<p> <!-- CL 38796 -->
  The
  new <a href="/pkg/testing/#T.Helper"><code>(*T).Helper</code></a>
  an <a href="/pkg/testing/#B.Helper"><code>(*B).Helper</code></a>
  methods mark the calling function as a test helper function.  When
  printing file and line information, that function will be skipped.
  This permits writing test helper functions while still having useful
  line numbers for users.
</p>

<h3 id="minor_library_changes">Minor changes to the library</h3>

<p>
  As always, there are various minor changes and updates to the library,
  made with the Go 1 <a href="/doc/go1compat">promise of compatibility</a>
  in mind.
</p>
{'fraction_non_alphanumeric': 0.14161088967436264, 'fraction_numerical': 0.03842972098969692, 'mean_word_length': 3.9508562918838424, 'pattern_counts': {'":': 6, '<': 325, '<?xml version=': 0, '>': 325, 'https://': 34, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6292503', 'n_tokens_mistral': 4643, 'n_tokens_neox': 4217, 'n_words': 1518}