@@ -23,12 +23,18 @@ <h2 id="introduction">DRAFT RELEASE NOTES - Introduction to Go 1.9</h2>
23
23
</ strong > </ p >
24
24
25
25
< p >
26
- The latest Go release, version 1.9, arrives six months after < a href ="go1.8 "> Go 1.8</ a >
27
- and is the tenth release in the < a href ="https://golang.org/doc/devel/release.html "> Go 1.x series</ a > .
28
- Most of its changes are in the implementation of the toolchain, runtime, and libraries.
29
- There are no changes to the language specification.
30
- As always, the release maintains the Go 1 < a href ="/doc/go1compat.html "> promise of compatibility</ a > .
31
- We expect almost all Go programs to continue to compile and run as before.
26
+ The latest Go release, version 1.9, arrives six months
27
+ after < a href ="go1.8 "> Go 1.8</ a > and is the tenth release in
28
+ the < a href ="https://golang.org/doc/devel/release.html "> Go 1.x
29
+ series</ a > .
30
+ There is one < a href ="#language "> change to the language</ a > , adding
31
+ support for type aliases.
32
+ Most of the changes are in the implementation of the toolchain,
33
+ runtime, and libraries.
34
+ As always, the release maintains the Go 1
35
+ < a href ="/doc/go1compat.html "> promise of compatibility</ a > .
36
+ We expect almost all Go programs to continue to compile and run as
37
+ before.
32
38
</ p >
33
39
34
40
< p >
@@ -39,6 +45,29 @@ <h2 id="introduction">DRAFT RELEASE NOTES - Introduction to Go 1.9</h2>
39
45
and includes a new < a href ="#math-bits "> bit manipulation package</ a > .
40
46
</ p >
41
47
48
+ < h2 id ="language "> Changes to the language</ h2 >
49
+
50
+ < p >
51
+ There is one change to the language.
52
+ Go now supports type aliases to support gradual code repair while
53
+ moving a type between packages.
54
+ The < a href ="https://golang.org/design/18130-type-alias "> type alias
55
+ design document</ a >
56
+ and < a href ="https://talks.golang.org/2016/refactor.article "> an
57
+ article on refactoring</ a > cover the problem in detail.
58
+ In short, a type alias declaration has the form:
59
+ </ p >
60
+
61
+ < pre >
62
+ type T1 = T2
63
+ </ pre >
64
+
65
+ < p >
66
+ This declaration introduces an alias name < code > T1</ code > —an
67
+ alternate spelling—for the type denoted by < code > T2</ code > ; that is,
68
+ both < code > T1</ code > and < code > T2</ code > denote the same type.
69
+ </ p >
70
+
42
71
< h2 id ="ports "> Ports</ h2 >
43
72
44
73
< p >
@@ -147,7 +176,7 @@ <h3 id="test-helper">Test Helper Functions</h3>
147
176
The
148
177
new < a href ="/pkg/testing/#T.Helper "> < code > (*T).Helper</ code > </ a >
149
178
an < a href ="/pkg/testing/#B.Helper "> < code > (*B).Helper</ code > </ a >
150
- methods marks the calling function as a test helper function. When
179
+ methods mark the calling function as a test helper function. When
151
180
printing file and line information, that function will be skipped.
152
181
This permits writing test helper functions while still having useful
153
182
line numbers for users.
0 commit comments