- Define what it means for two identifiers to be unique.
- The current spec is incorrect about exported
identifiers: for instance, it excluded fields
of non-exported types of exported variables
from being exported. It is easier to leave
the detailed specification away and let the
rest of the spec govern access of exported
identifiers.
- The current spec is incorrect about qualified
identifiers: It simply required that an identifier
be exported to be valid in a qualified identifier.
However, qualified identifiers can only access
exported identifiers declared in the package
block of the imported package.
Fixes#1551.
R=r, rsc, iant, ken
CC=golang-dev
https://golang.org/cl/5711043
- more idiomatic examples of pointer types
- show use of _ in examples of function types
- remove "legal:" qualification in examples
for consistency
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5711054
When we first wrote the method set definition, we had long
discussions about whether method sets applied to all types
or just named types, and we (or at least I) concluded that it
didn't matter: the two were equivalent points of view, because
the only way to introduce a new method was to write a method
function, which requires a named receiver type.
However, the addition of embedded types changed this.
Embedding can introduce a method without writing an explicit
method function, as in:
var x struct {
sync.Mutex
}
var px *struct {
sync.Mutex
}
var _, _ sync.Locker = &x, px
The edits in this CL make clear that both &x and px satisfy
sync.Locker. Today, gccgo already works this way; 6g does not.
R=golang-dev, gri, iant, r
CC=golang-dev
https://golang.org/cl/5702062
Change #foo to div#foo to avoid selecting headings
with anchor foo, such as <h1 id="foo">.
(A more extensive change would be to use class
selectors for styling. Perhaps this is better, since id:s
should be unique within a document according to
http://www.w3.org/TR/CSS2/selector.html#id-selectors)
R=golang-dev, gri, adg
CC=golang-dev
https://golang.org/cl/5702044
This distills the motivational discussion and makes it the introduction to the release notes.
After this lands, I'll expand the discussion of the major changes to include more background.
Updates #3086.
R=golang-dev, gri, rsc
CC=golang-dev
https://golang.org/cl/5698057
Also reformat the "go fix" references to make them look better by using the non-CW space.
Fixes#3087.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5695057
Or, depending on your point of view, make the
comparisons satisfy any surrounding boolean type.
Also, fix a few foo_bar -> fooBar in code fragments.
Fixes#2561.
R=golang-dev, r, bradfitz, gri, iant, kevlar
CC=golang-dev
https://golang.org/cl/5671096
They are portability problems and the options are almost always zero in practice anyway.
R=golang-dev, dsymonds, r, bradfitz
CC=golang-dev
https://golang.org/cl/5688046
* disallow embedding of C type (Fixes issue 2552)
* detect 0-length array (Fixes issue 2806)
* use typedefs when possible, to avoid attribute((unavailable)) (Fixes issue 2888)
* print Go types constructed from C types using original C types (Fixes issue 2612)
This fix changes _cgo_export.h to repeat the preamble from import "C".
Otherwise the fix to issue 2612 is impossible, since it cannot refer to
types that have not been defined. If people are using //export and
putting non-header information in the preamble, they will need to
refactor their code.
R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/5672080