]> Cypherpunks repositories - gostls13.git/commit
spec: clarify section on package initialization
authorRobert Griesemer <gri@golang.org>
Tue, 20 May 2014 20:51:39 +0000 (13:51 -0700)
committerRobert Griesemer <gri@golang.org>
Tue, 20 May 2014 20:51:39 +0000 (13:51 -0700)
commita43669843b155ddb575d95acdb72dc62a1434efd
treea4f09c4e80a9e31d0c6f3cdb600b31dead3e3989
parent4d36ad77912018b1c1dcfeddf3e7a87d92936f8c
spec: clarify section on package initialization

- split description of package initialization and
  program execution
- better grouping of concerns in section on package
  initialization
- more explicit definition of what constitues a
  dependency
- removed language about constant dependencies -
  they are computed at compile-time and not
  initialized at run-time
- clarified that independent variables are initialized
  in declaration order (rather than reference order)

Note that the last clarification is what distinguishes
gc and gccgo at the moment: gc uses reference order
(i.e., order in which variables are referenced in
initialization expressions), while gccgo uses declaration
order for independent variables.

Not a language change. But adopting this CL will
clarify what constitutes a dependency.

Fixes #6703.

LGTM=adonovan, r, iant, rsc
R=r, rsc, iant, ken, adonovan
CC=golang-codereviews
https://golang.org/cl/99020043
doc/go_spec.html