Find a file
Robert Griesemer 259f0ffade spec: specify variable initialization order explicitly
The existing spec rules on package initialization were
contradictory: They specified that 1) dependent variables
are initialized in dependency order, and 2) independent
variables are initialized in declaration order. This 2nd
rule cannot be satisfied in general. For instance, for

var (
        c = b + 2
        a = 0
        b = 1
)

because of its dependency on b, c must be initialized after b,
leading to the partial order b, c. Because a is independent of
b but is declared before b, we end up with the order: a, b, c.
But a is also independent of c and is declared after c, so the
order b, c, a should also be valid in contradiction to a, b, c.

The new rules are given in form of an algorithm which outlines
initialization order explicitly.

gccgo and go/types already follow these rules.

Fixes #8485.

LGTM=iant, r, rsc
R=r, rsc, iant, ken, gordon.klaus, adonovan
CC=golang-codereviews
https://golang.org/cl/142880043
2014-09-29 12:44:50 -07:00
api unicode: strconv: regexp: Upgrade to Unicode 7.0.0. 2014-08-18 20:26:10 +02:00
doc spec: specify variable initialization order explicitly 2014-09-29 12:44:50 -07:00
include build: fix elf builds 2014-09-24 14:45:11 -07:00
lib codereview: do not hit upload_complete on first patch 2014-08-06 16:12:24 -04:00
misc cgo: adjust return value location to account for stack copies. 2014-09-25 07:59:01 -07:00
src crypto/x509: accept CRLs without an expiry. 2014-09-29 12:26:51 -07:00
test cmd/ld: don't automatically mark symbols created by -X as reachable 2014-09-28 08:27:05 -07:00
.hgignore .hgignore: delete some dregs 2014-09-25 17:30:12 -07:00
.hgtags tag go1.3.2 2014-09-26 10:53:09 +10:00
AUTHORS A+C: Hector Martin Cantero (individual CLA) 2014-09-24 13:12:15 -04:00
CONTRIBUTORS C: add Andres Erbsen (Google CLA) 2014-09-29 12:15:25 -07:00
favicon.ico godoc: update favicon 2012-10-11 17:02:36 +11:00
LICENSE
PATENTS
README README: Fix installation instructions 2013-11-20 13:47:37 -08:00
robots.txt

This is the source code repository for the Go programming language.  

For documentation about how to install and use Go,
visit http://golang.org/ or load doc/install-source.html
in your web browser.

After installing Go, you can view a nicely formatted
doc/install-source.html by running godoc --http=:6060
and then visiting http://localhost:6060/doc/install/source.

Unless otherwise noted, the Go source files are distributed
under the BSD-style license found in the LICENSE file.

--

Binary Distribution Notes

If you have just untarred a binary Go distribution, you need to set
the environment variable $GOROOT to the full path of the go
directory (the one containing this README).  You can omit the
variable if you unpack it into /usr/local/go, or if you rebuild
from sources by running all.bash (see doc/install.html).
You should also add the Go binary directory $GOROOT/bin
to your shell's path.

For example, if you extracted the tar file into $HOME/go, you might
put the following in your .profile:

    export GOROOT=$HOME/go
    export PATH=$PATH:$GOROOT/bin

See doc/install.html for more details.