1
0
mirror of https://github.com/golang/go synced 2024-11-12 07:10:22 -07:00
go/doc
Robert Griesemer 47094dcf09 spec: clarify variable declaration type rules
Not a language change.

Several inaccuracies were fixed:

1) A variable declaration may declare more than just one
variable.

2) Variable initialization follows the rules of assignments,
including n:1 assignments. The existing wording implied a 1:1
or n:n rule and generally was somewhat unspecific.

3) The rules for variable declarations with no types and
untyped initialization expressions had minor holes (issue 8088).

4) Clarified the special cases of assignments of untyped values
(we don't just have untyped constants, but also untyped bools,
e.g. from comparisons). The new wording is more direct.

To that end, introduced the notion of an untyped constant's
"default type" so that the same concept doesn't have to be
repeatedly introduced.

Fixes #8088.

LGTM=iant, r, rsc
R=r, rsc, iant, ken
CC=golang-codereviews
https://golang.org/cl/142320043
2014-09-30 11:44:29 -07:00
..
articles build: adjustments for move from src/pkg to src 2014-09-08 00:06:45 -04:00
codewalk doc: fix typo in sharemem codewalk 2014-05-21 14:34:20 -07:00
devel doc: document Go 1.3.2 2014-09-26 11:00:49 +10:00
gopher doc/gopher: add biplane.jpg 2014-09-25 14:10:56 -07:00
play doc: remove godocs.js and playground.js from core repo 2013-08-01 15:09:18 +10:00
progs doc/progs: don't try building cgo tests if CGO_ENABLED=0 2013-10-11 08:55:13 -07:00
asm.html all: copy cmd/ld/textflag.h into pkg/GOOS_GOARCH 2014-08-12 17:04:45 -07:00
cmd.html doc/cmd.html: close a tag. 2014-08-26 05:26:48 -07:00
code.html doc: drop scheme from links that are known to support HTTPS 2014-07-25 10:28:39 +10:00
contrib.html doc: drop scheme from links that are known to support HTTPS 2014-07-25 10:28:39 +10:00
contribute.html build: adjustments for move from src/pkg to src 2014-09-08 00:06:45 -04:00
debugging_with_gdb.html build: adjustments for move from src/pkg to src 2014-09-08 00:06:45 -04:00
docs.html doc: drop scheme from links that are known to support HTTPS 2014-07-25 10:28:39 +10:00
effective_go.html build: adjustments for move from src/pkg to src 2014-09-08 00:06:45 -04:00
gccgo_contribute.html build: adjustments for move from src/pkg to src 2014-09-08 00:06:45 -04:00
gccgo_install.html doc: fix broken link to RTEMS Go wiki page 2014-04-28 06:27:22 -07:00
go1.1.html doc: drop scheme from links that are known to support HTTPS 2014-07-25 10:28:39 +10:00
go1.2.html doc: drop scheme from links that are known to support HTTPS 2014-07-25 10:28:39 +10:00
go1.3.html doc: document new ParseMultipartForm behavior 2014-08-07 15:42:06 +10:00
go1.4.txt doc/go1.4: go test builds + links all test files (CL 150980043) 2014-09-26 17:09:40 -04:00
go1.html doc: link directly to https://golang.org/dl/ 2014-09-12 09:15:58 +10:00
go1compat.html doc/compat1.html: link to go.sys 2014-08-12 15:45:35 -07:00
go_faq.html doc/faq: update for 1.4 2014-09-27 11:56:54 -07:00
go_mem.html doc: fix happens-before rules for buffered channels 2014-06-05 21:08:28 +04:00
go_spec.html spec: clarify variable declaration type rules 2014-09-30 11:44:29 -07:00
go-logo-black.png doc: pngcrush and remove old, unused images 2012-03-08 14:18:28 +11:00
go-logo-blue.png doc: pngcrush and remove old, unused images 2012-03-08 14:18:28 +11:00
go-logo-white.png doc: pngcrush and remove old, unused images 2012-03-08 14:18:28 +11:00
help.html doc: drop scheme from links that are known to support HTTPS 2014-07-25 10:28:39 +10:00
ie.css golang.org redesign 2010-09-16 14:01:02 +10:00
install-source.html doc: drop scheme from links that are known to support HTTPS 2014-07-25 10:28:39 +10:00
install.html doc: link directly to https://golang.org/dl/ 2014-09-12 09:15:58 +10:00
logo-153x55.png doc: pngcrush and remove old, unused images 2012-03-08 14:18:28 +11:00
root.html doc: drop scheme from links that are known to support HTTPS 2014-07-25 10:28:39 +10:00
share.png godoc: change link styles, add 'pop out' button 2012-03-13 11:00:11 +11:00
sieve.gif repair corrupted sieve.gif 2009-10-30 10:34:01 -07:00
tos.html doc: drop scheme from links that are known to support HTTPS 2014-07-25 10:28:39 +10:00