Robert Griesemer
07cc6440dc
go_spec: don't allow parens around the literal type of composite literals
...
Background: The current spec is imprecise with respect to the parsing ambiguity
for composite literals: It says that the ambiguity arises when the TypeName form
of the LiteralType is used. The following code:
if (B) {} ...
is not using the TypeName form (but the parenthesized TypeName form) and thus
could be interpreted as:
if ((B){}) ...
instead of
if B {} ...
Both compilers and gofmt choose the latter interpretation. One could fix the
spec by making the clause regarding the parsing ambiguity more precise ("...using
the _possibly parenthesized_ TypeName form of the LiteralType..."). The alternative
(chosen here) is to simply disallow parenthesized literal types. Except for a single
test case (test/parentype.go) there appears to be no Go code under $GOROOT containing
parenthesized literal types. Furthermore, parentheses are never needed around a
literal type for correct parsing.
R=golang-dev
CC=golang-dev
https://golang.org/cl/1913041
2010-07-29 18:13:41 -07:00
Andrew Gerrand
bab711b184
doc: update front page and go_learning.html
...
This is a stop-gap change to give more current information visibility
before a more thorough reorganization.
R=r, rsc, gri
CC=golang-dev
https://golang.org/cl/1902042
2010-07-30 10:36:13 +10:00
Andrew Gerrand
88fc337fa2
spec: add recover to predeclared identifiers list
...
R=gri
CC=golang-dev
https://golang.org/cl/1894043
2010-07-27 15:03:30 +10:00
Vinu Rajashekhar
658d521358
gccgo_install.html: Description of the port to RTEMS added.
...
R=iant, r
CC=gofrontend-dev, golang-dev, joel.sherrill
https://golang.org/cl/1846047
2010-07-20 00:06:20 -07:00
Andrew Gerrand
7317c10f5e
release.2010-07-14
...
R=rsc
CC=golang-dev
https://golang.org/cl/1844041
2010-07-15 13:04:04 +10:00
Robert Griesemer
dc60c5a7ec
go spec: clarification of channel close()
...
R=r, rsc
CC=golang-dev
https://golang.org/cl/1766042
2010-07-14 16:09:22 -07:00
Rob Pike
708d7160fa
tutorial: show how to compile helloworld3, which depends on ./file
...
make shell prompts consistent
R=rsc
CC=golang-dev
https://golang.org/cl/1824042
2010-07-14 13:29:12 -07:00
Rob Pike
041d11623f
Go specification: Lock down some details about channels and select:
...
- nil channel in regular send or receive panics
- empty select blocks forever
R=rsc, gri, iant, ken2
CC=golang-dev
https://golang.org/cl/1825043
2010-07-13 16:23:54 -07:00
Robert Griesemer
0c2e6b3637
go spec: specify len/cap for nil slices, maps, and channels
...
Fixes #891 .
R=r, rsc
CC=golang-dev
https://golang.org/cl/1760043
2010-07-13 11:54:57 -07:00
Robert Griesemer
73ca127e67
go/spec: fix typo
...
R=r
CC=golang-dev
https://golang.org/cl/1790041
2010-07-09 13:02:54 -07:00
Andrew Gerrand
eca2ec0786
doc/go_tutorial: mention order of compilation
...
In response to this recurring issue:
http://groups.google.com/group/golang-nuts/t/710d1e8347cd51fa
R=r
CC=golang-dev
https://golang.org/cl/1682050
2010-07-05 16:25:29 +10:00
Andrew Gerrand
520d5db4d3
Add various items to the Go Resources page.
...
R=r
CC=golang-dev
https://golang.org/cl/1674045
2010-07-02 13:32:02 +10:00
Russ Cox
f4429181df
spec: restrict when len(x) is constant
...
R=gri, iant, ken2, r
CC=golang-dev
https://golang.org/cl/1687047
2010-07-01 17:49:47 -07:00
Andrew Gerrand
4abbd32b53
release.2010-07-01
...
R=rsc
CC=golang-dev
https://golang.org/cl/1741047
2010-07-02 10:36:43 +10:00
Andrew Gerrand
71675c6fa0
doc/codewalk: Share Memory By Communicating
...
R=r, rsc
CC=golang-dev
https://golang.org/cl/1727043
2010-06-30 16:56:30 +10:00
Andrew Gerrand
983353e79b
release.2010-06-21
...
R=rsc, r
CC=golang-dev
https://golang.org/cl/1717046
2010-06-21 23:16:38 +01:00
Russ Cox
e495351ff7
spec: struct tags must be identical for types to be identical
...
We didn't mention this explicitly during our discussions,
but I think it fits the "identical types are spelled identically"
rule that we used.
R=gri, iant, ken2, r, rsc1
CC=golang-dev
https://golang.org/cl/1698043
2010-06-21 12:42:33 -07:00
Rob Pike
4fd7880d81
Effective Go: minor change to correct a comment in an example
...
R=rsc
CC=golang-dev
https://golang.org/cl/1689042
2010-06-18 20:33:03 -07:00
Rob Pike
99b23a1e5b
Effective Go: panic and recover
...
R=rsc, iant
CC=golang-dev
https://golang.org/cl/1718042
2010-06-18 10:52:37 -07:00
Rob Pike
050905b985
Effective Go: add a section on defer.
...
R=rsc, iant
CC=golang-dev
https://golang.org/cl/1694044
2010-06-16 13:47:36 -07:00
Rob Pike
6c08859b0e
Effective Go: update ... discussion.
...
R=rsc
CC=golang-dev
https://golang.org/cl/1698041
2010-06-14 22:40:35 -07:00
Rob Pike
b9055629c1
tutorial: update discussion of variadic functions
...
R=rsc
CC=golang-dev
https://golang.org/cl/1677042
2010-06-14 12:27:22 -07:00
Russ Cox
9562592342
spec: remove ... (keeping ...T)
...
R=gri, iant, ken2, r, r2
CC=golang-dev
https://golang.org/cl/1632041
2010-06-12 11:37:13 -07:00
Rob Pike
db8c2b1803
spec: clarify that result parameters are always zeroed before the function executes.
...
R=golang-dev
CC=golang-dev
https://golang.org/cl/1641043
2010-06-11 21:30:03 -07:00
Andrew Gerrand
61be33d3ae
release.2010-06-09
...
R=rsc
CC=golang-dev
https://golang.org/cl/1644041
2010-06-09 23:10:28 +02:00
Russ Cox
104cd57c6d
doc: add Google I/O talk and programs
...
R=r
CC=golang-dev
https://golang.org/cl/1614041
2010-06-08 16:00:04 -07:00
Robert Griesemer
440cc95470
go spec: rename "assignment compatible" -> "assignable"
...
R=r, rsc
CC=golang-dev
https://golang.org/cl/1590041
2010-06-07 17:40:21 -07:00
Robert Griesemer
7bc03718f4
go spec: clean-up and consolidation of spec with implementation
...
Specifically:
- introduced notion of "underlying type"
- removed notion of type compatibility
- consolidated rules about assignment compatibility in
assignment compatibility section
- be consistent with specyfing that nil is the value
for uninitialized variables that can be nil (this
was not specified clearly for pointers, functions, interfaces)
- added/fixed various related links throughout
- clarify language on conversions
R=rsc, r, iant, ken2
CC=golang-dev
https://golang.org/cl/1536041
2010-06-07 15:49:39 -07:00
Rob Pike
f81abb9dd8
tutorial: fix one-word mistake in echo example
...
R=rsc, iant
CC=golang-dev
https://golang.org/cl/1567041
2010-06-05 12:06:18 -07:00
Robert Griesemer
1d282a8eb2
go spec: Base comparison compatibility on assignment compatibility.
...
Specifically:
- Simplified definition of comparison compatibility and folded into
section on comparison operators since it's only used there.
This is a small language change/cleanup. As a consequence:
- An interface value may now be compared against a non-interface value.
- Channels with opposite directions cannot be compared directly anymore
(per discussion with rsc).
R=rsc, r, iant, ken2
CC=golang-dev
https://golang.org/cl/1462041
2010-06-03 16:55:50 -07:00
Peter Williams
6372bbbf3e
doc: codereview + Mercurial Queues
...
R=rsc, r
CC=golang-dev
https://golang.org/cl/1238044
2010-06-02 17:11:52 -07:00
Andrew Gerrand
ac1d4980db
doc/code.html: fix error string format
...
R=rsc
CC=golang-dev
https://golang.org/cl/1444041
2010-06-01 16:50:16 +02:00
Joe Poirier
2fa388e063
edit simple typos
...
R=golang-dev, adg
CC=golang-dev, rsc
https://golang.org/cl/1426042
2010-06-01 16:21:34 +02:00
Andrew Gerrand
24566d4236
doc/code: example package with tests
...
R=r
CC=golang-dev
https://golang.org/cl/1404041
2010-05-30 19:21:49 +02:00
Robert Griesemer
63f014910d
go spec: change def. of "type compatibility" to be non-recursive
...
and adjust conversion rules.
Also:
- clarification of type identity (no language change)
- adjust special rules for channel assignment/comparison to
require identical element types (in correspondence to non-
recursiveness of type compatibility)
R=rsc, iant, ken2, r
CC=golang-dev
https://golang.org/cl/1376042
2010-05-28 14:17:30 -07:00
Robert Griesemer
31f2503cde
go spec: Disallow &a notation to obtain a slice
...
from an array; one needs to write a[0:] instead.
R=rsc, r, iant, ken2
CC=golang-dev
https://golang.org/cl/1365041
2010-05-27 17:23:25 -07:00
Andrew Gerrand
371bf8e61b
release.2010-05-27
...
R=r, rsc
CC=golang-dev
https://golang.org/cl/1354041
2010-05-27 16:50:31 -07:00
Andrew Gerrand
1ca99c84f8
golang.org: added Resources page, re-organized left hand panel.
...
R=r
CC=golang-dev
https://golang.org/cl/1309045
2010-05-27 16:47:42 -07:00
Evan Shaw
67d30bb696
spec: Fix link to fallthrough statements
...
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/1303041
2010-05-25 18:24:07 -07:00
Robert Griesemer
c7e03a32b3
go spec: minor fix, to match conversion rules 4 and 5
...
R=rsc
CC=golang-dev
https://golang.org/cl/1270042
2010-05-24 21:25:01 -07:00
Robert Griesemer
934a520d75
go spec: fix and clarify syntax of conversions
...
Fixes #803 .
R=rsc, r, iant, ken2
CC=golang-dev
https://golang.org/cl/1281041
2010-05-24 14:58:26 -07:00
Russ Cox
e7561de09a
spec: index of non-addressable array is not addressable
...
Motivated by:
func f() []int
func g() [10]int
f()[1] = 1 // ok
g()[1] = 1 // ERROR
R=gri
CC=golang-dev
https://golang.org/cl/1278041
2010-05-24 14:31:43 -07:00
Evan Shaw
cb4e9f8508
spec: Fix a code tag
...
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/1266042
2010-05-23 11:21:47 -07:00
Robert Griesemer
3af4803704
go spec: added imaginary literal to semicolon rules (was missing)
...
- also added links to the respective sections
- reformatted section for better (source html) readability
- added missing closing </li>'s in many places
R=r
CC=golang-dev
https://golang.org/cl/1220041
2010-05-14 13:11:48 -07:00
Andrew Gerrand
e0bde8cfe8
rename 'gordon' to 'gopher'
...
R=r
CC=golang-dev
https://golang.org/cl/1207041
2010-05-13 11:53:44 -07:00
Robert Griesemer
56ca697269
go spec: simplify section on channel types
...
R=rsc, iant, r
CC=golang-dev
https://golang.org/cl/1171041
2010-05-07 18:22:40 -07:00
Andrew Gerrand
fbf8d263f9
codelab/wiki: fix typo in demo URL
...
R=r
CC=golang-dev
https://golang.org/cl/1148041
2010-05-07 10:16:16 +10:00
Andrew Gerrand
174ca90b2c
release.2010-05-04
...
R=r, rsc
CC=golang-dev
https://golang.org/cl/1094043
2010-05-05 12:12:04 +10:00
Robert Griesemer
df674ffb43
go spec: clarification of make arguments,
...
specification of runtime exceptions for
make and division by zero
R=r, rsc, ken2, iant
CC=golang-dev
https://golang.org/cl/1081041
2010-05-04 17:31:40 -07:00
Andrew Gerrand
a0514459aa
codelab/wiki: switch edit/view, as they were backwards
...
Fixes #757 .
R=rsc
CC=golang-dev
https://golang.org/cl/1064041
2010-05-03 12:09:44 +10:00
Robert Griesemer
39f009cb8e
go spec: fix iota description
...
R=r, rsc
CC=golang-dev
https://golang.org/cl/946046
2010-04-29 10:57:27 -07:00
Andrey Mirtchovski
452dd3829e
codelab/index.html: a few typos.
...
R=adg
CC=golang-dev
https://golang.org/cl/993042
2010-04-29 14:33:19 +10:00
Andrey Mirtchovski
ad26019ba6
codelab/index.html "os" needs to be imported because os.Error is used almost immediately
...
Also, calling fmt, ioutil and os "builtin" is probably confusing.
R=adg
CC=golang-dev
https://golang.org/cl/965045
2010-04-29 14:06:27 +10:00
Rob Pike
de92199648
spec: clarify "continue" with label. the text was obvious in intent but
...
inaccurate in meaning.
R=gri
CC=golang-dev
https://golang.org/cl/964045
2010-04-28 13:18:40 -07:00
Andrew Gerrand
70ee7bff79
release.2010-04-27
...
R=r, rsc
CC=golang-dev
https://golang.org/cl/963042
2010-04-28 14:05:01 +10:00
Andrew Gerrand
0f945b972d
wiki codelab: typo fix
...
noticed this as I was submitting the previous CL :(
R=r
CC=golang-dev
https://golang.org/cl/989045
2010-04-28 12:39:17 +10:00
Andrew Gerrand
78d9a6074d
Wiki codelab, complete with tests.
...
R=r, rsc, gri
CC=golang-dev
https://golang.org/cl/887045
2010-04-28 12:36:39 +10:00
Robert Griesemer
f5b3c14f31
go spec: fix wrong comment
...
Fixes #743 .
R=r, rsc
CC=golang-dev
https://golang.org/cl/944044
2010-04-27 17:52:44 -07:00
Andrew Gerrand
a82349614b
go_tutorial: removed outdated use of semicolons
...
R=r
CC=golang-dev
https://golang.org/cl/1013042
2010-04-28 10:50:44 +10:00
Andrew Gerrand
28c6305a0e
homepage: removed animation, use custom js instead of gdynamicfeeds
...
R=rsc
CC=golang-dev
https://golang.org/cl/949043
2010-04-27 19:27:32 +10:00
Russ Cox
2a591bdf8a
godoc: add codewalk support
...
R=adg, gri
CC=golang-dev, r
https://golang.org/cl/1008042
2010-04-26 22:35:12 -07:00
Andrew Gerrand
cd5191fd30
doc/root.html: remove key from jsapi src
...
R=rsc, r
CC=golang-dev
https://golang.org/cl/1010041
2010-04-27 10:24:17 +10:00
Andrew Gerrand
05427748ef
go_faq: typo fix
...
R=rsc
CC=golang-dev
https://golang.org/cl/962043
2010-04-23 10:02:10 +10:00
Evan Shaw
21110c799d
spec: Fix run-time panic header id
...
Everything was linking to "Run_time_panics", but the id was "Run_time_errors".
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/961042
2010-04-22 10:14:53 -07:00
Andrew Gerrand
aa2187efa3
faq: more up-to-date info about the Windows port
...
R=r
CC=golang-dev
https://golang.org/cl/961041
2010-04-22 09:15:35 +10:00
Andrew Gerrand
0857573a67
go_faq: add question: Why does Go perform badly on benchmark X?
...
R=r, cw
CC=golang-dev
https://golang.org/cl/895043
2010-04-21 14:00:56 +10:00
Russ Cox
6aad41919b
go_spec updates
...
R=r, iant
CC=golang-dev
https://golang.org/cl/921041
2010-04-13 20:55:57 -07:00
Andrew Gerrand
93efe475bf
release.2010-04-13
...
R=rsc, r
CC=golang-dev
https://golang.org/cl/902045
2010-04-14 11:49:47 +10:00
Ian Lance Taylor
cd242fb480
Use the copy function rather than a loop.
...
R=r
CC=golang-dev
https://golang.org/cl/882047
2010-04-13 13:05:29 -07:00
Rob Pike
bc2d977d67
Update roadmap: delete many accomplishments
...
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/854045
2010-04-09 13:22:05 -07:00
Joe Poirier
d37e87c1b2
gp_spec typo fix: code example in the "Handling panics" section
...
R=rsc, adg
CC=golang-dev
https://golang.org/cl/881047
2010-04-08 10:25:57 +10:00
Rob Pike
a3db32d2a6
Language FAQ: editing tweaks after iant.
...
R=iant
CC=golang-dev
https://golang.org/cl/874043
2010-04-07 16:13:14 -07:00
Rob Pike
956926ee31
Language FAQ: update the entry on exceptions.
...
R=rsc, iant
CC=golang-dev
https://golang.org/cl/824045
2010-04-07 16:03:12 -07:00
David Symonds
cc99ba0a96
doc/go_mem: remove semicolons
...
R=adg
CC=golang-dev
https://golang.org/cl/893041
2010-04-06 11:14:44 +10:00
Andrew Gerrand
fb2758167f
programming_faq: added question on T vs *T method sets
...
Adding this question on Russ' recommendation - not sure if
there is some detail here I'm missing.
The associated discussion was:
http://groups.google.com/group/golang-nuts/t/ec6b27e332ed7f77
R=rsc, r
CC=golang-dev
https://golang.org/cl/887042
2010-04-05 18:17:08 +10:00
Robert Griesemer
d4a1619733
go spec: correct clarification of type declaration
...
R=rsc, r
CC=golang-dev
https://golang.org/cl/855043
2010-04-01 12:48:34 -07:00
Robert Griesemer
735e00d4a0
go spec: clarification of type declarations
...
R=r, rsc
CC=golang-dev
https://golang.org/cl/849044
2010-03-31 16:37:22 -07:00
Andrew Gerrand
c2f3737cb0
release 2010-03-30
...
R=rsc, gri
CC=golang-dev
https://golang.org/cl/821045
2010-03-31 11:40:57 +11:00
Robert Griesemer
e8e4987ba3
godoc: support for title and subtitle headers when serving .html docs
...
and use it to show version (date) of go spec
Fixes #68 .
R=rsc
CC=golang-dev, r
https://golang.org/cl/848042
2010-03-30 17:37:42 -07:00
Rob Pike
4710642d41
Effective Go: update maps description regarding lookup of nonexistent entry.
...
R=rsc, gri, iant
CC=golang-dev
https://golang.org/cl/821044
2010-03-30 11:21:50 -07:00
Russ Cox
00f9f0c056
single argument panic
...
note that sortmain.go has been run through hg gofmt;
only the formatting of the day initializers changed.
i'm happy to revert that formatting if you'd prefer.
stop on error in doc/progs/run
R=r
CC=golang-dev
https://golang.org/cl/850041
2010-03-30 10:34:57 -07:00
Andrew Gerrand
10b77f7a2b
spec: typo in switch sample code, missing semicolon
...
Fixes #697
R=r
CC=golang-dev
https://golang.org/cl/804042
2010-03-29 13:12:08 +11:00
Russ Cox
97d0e8fe6c
gc: allow taking address of out parameters
...
Fixes #186 .
R=ken2
CC=golang-dev
https://golang.org/cl/793041
2010-03-26 18:01:02 -07:00
Rob Pike
5bb29fb116
spec changes for panic and recover.
...
R=rsc, gri
CC=golang-dev
https://golang.org/cl/763041
2010-03-25 17:59:59 -07:00
Nigel Tao
16e543163b
Sydney University tech talk.
...
R=adg
CC=golang-dev
https://golang.org/cl/744042
2010-03-25 16:15:52 +11:00
Rob Pike
bf9b8f2c17
Delete panicln from the spec.
...
R=rsc, gri, iant, ken2
CC=golang-dev
https://golang.org/cl/738041
2010-03-24 15:17:00 -07:00
Robert Griesemer
48f0cd2bd5
go spec: modification of defer statement
...
R=r, rsc, ken2, iant
CC=golang-dev
https://golang.org/cl/708041
2010-03-23 17:30:14 -07:00
Rob Pike
6b3031beaa
FAQ: Protocol buffers are now supported. Update the entry.
...
R=rsc, adg
CC=golang-dev
https://golang.org/cl/702042
2010-03-23 17:03:28 -07:00
Robert Griesemer
29f1ca528b
Go spec: map indexing never raises a runtime exception.
...
Also: Actual map key must be assignment-compatible with
formal map key type.
Fixes #357 .
R=r, iant, rsc, ken2
CC=golang-dev
https://golang.org/cl/673042
2010-03-23 14:01:51 -07:00
Andrew Gerrand
a1723941e0
release.2010-03-22
...
R=rsc
CC=golang-dev
https://golang.org/cl/643042
2010-03-23 12:56:39 +11:00
Andrew Gerrand
7190fdd3bf
website: add Go Blog widget to frontpage,
...
add Blog and Wiki links to sideba
R=r, rsc, gri
CC=golang-dev
https://golang.org/cl/611042
2010-03-20 11:42:57 +11:00
James Toy
791a26734f
doc/htmlgen.go: remove unnecessary semicolons
...
R=rsc
CC=golang-dev
https://golang.org/cl/589043
2010-03-19 16:17:18 -07:00
Russ Cox
a24f8144e4
doc/install: tweak port text; drop redundant list of operating systems.
...
R=adg
CC=golang-dev, r
https://golang.org/cl/597041
2010-03-16 18:45:16 -07:00
Robert Griesemer
74fac99d05
godoc: initial support for showing popup information
...
for identifiers in Go source code
- at the moment just show identifier kind (var, func, etc.) and name
(eventually should show declaration, type, etc.)
- JavaScript parts by adg
R=rsc
CC=adg, golang-dev
https://golang.org/cl/578042
2010-03-16 14:17:42 -07:00
Andrew Gerrand
6f9272f5dd
release.2010-03-15
...
R=rsc
CC=golang-dev
https://golang.org/cl/579041
2010-03-16 10:44:13 +11:00
Andrew Gerrand
9aff17f0d7
install.html: elaborate on shell profile instructions
...
R=r, rsc
CC=golang-dev
https://golang.org/cl/556041
2010-03-16 09:42:34 +11:00
Ian Lance Taylor
11a218444f
Revert previous change: complexN only converts to complexN.
...
This was discussed with Ken and Russ. 6g has been changed,
and both compilers now work this way. This avoids a double
type conversion--first to the float type, then to the complex
type.
R=r
CC=golang-dev, ken2, rsc
https://golang.org/cl/419042
2010-03-10 20:38:38 -08:00
Robert Griesemer
7cd4de6a07
install.html: add section on C tools
...
R=rsc
CC=golang-dev
https://golang.org/cl/238042
2010-03-10 16:31:09 -08:00
Robert Griesemer
ef4c2b85a0
go_spec.html: fix typo and link
...
R=r
CC=golang-dev
https://golang.org/cl/382045
2010-03-10 15:29:36 -08:00
Andrey Mirtchovski
9a44578806
missing ';' renders the code snippet incorrectly on website
...
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/367041
2010-03-09 14:21:34 -08:00