1
0
mirror of https://github.com/golang/go synced 2024-10-03 23:21:22 -06:00
Commit Graph

182 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Ian Lance Taylor
18187e7d49 Complex values may only be compared for equality or inequality.
R=gri, r
CC=golang-dev
https://golang.org/cl/294042
2010-03-08 14:05:46 -08:00
Ian Lance Taylor
5cf707b499 Clarify that conversions to complex are OK.
R=r
CC=golang-dev
https://golang.org/cl/296042
2010-03-08 13:45:03 -08:00
Rob Pike
7297087101 Spec for complex numbers
R=rsc, ken2, gri, iant
CC=cw, golang-dev
https://golang.org/cl/227041
2010-03-04 12:35:16 -08:00
Robert Griesemer
f42e8833b3 language spec: make NUL byte rule an implementation restriction
R=rsc, r, iant, ken2
CC=golang-dev
https://golang.org/cl/211041
2010-02-17 15:50:34 -08:00
Russ Cox
b7d9ffeecd spec: disallow NUL in source files
R=r
CC=golang-dev
https://golang.org/cl/209042
2010-02-16 16:47:18 -08:00
Rob Pike
1811fac7cb specification of []int(string) and []byte(string).
also clarify other string conversions.

R=rsc, iant, gri, ken2
CC=golang-dev
https://golang.org/cl/207103
2010-02-17 11:26:09 +11:00
Rob Pike
810def8484 ...T is now implemented
R=rsc, gri
CC=golang-dev
https://golang.org/cl/198050
2010-02-01 18:59:23 -08:00
Rob Pike
22a4952bd2 note that ...T is not yet implemented.
R=rsc
CC=golang-dev
https://golang.org/cl/194114
2010-01-27 13:45:16 -08:00
Rob Pike
b81065d07f add definition of new parameter style
... T
for trailing arguments of type T.

R=rsc, gri, ken2, iant
CC=golang-dev
https://golang.org/cl/194100
2010-01-27 13:14:40 -08:00
Robert Griesemer
1c369bd55f Clarify parsing of channel types.
R=r, rsc
CC=golang-dev
https://golang.org/cl/194091
2010-01-27 09:35:39 -08:00
Russ Cox
46871692c2 spec: allow func() func().
no longer ambiguous at top level, thanks to new semicolon rules.

use gofmt layout for function types.

Fixes #528.

R=gri
CC=golang-dev
https://golang.org/cl/194077
2010-01-26 10:25:56 -08:00
Rob Pike
3909b6b479 log.Fatal does not exist. Use log.Crash.
R=rsc
CC=golang-dev
https://golang.org/cl/193075
2010-01-25 07:48:31 +11:00
Russ Cox
16205a3534 spec: mention Inf and NaN are supported at run time.
add hyperlink at mention of package reflect.

Fixes #438.

R=r
CC=golang-dev
https://golang.org/cl/190042
2010-01-18 15:59:14 -08:00
Ian Lance Taylor
ae13f43810 Clarify when expressions are evaluated for a range clause.
R=gri, rsc
CC=golang-dev
https://golang.org/cl/189057
2010-01-13 12:50:45 -08:00
Rob Pike
632a98592d fix typo found by kevin ballard
R=gri
CC=golang-dev
https://golang.org/cl/186113
2010-01-13 12:06:33 +11:00
Rob Pike
7ec0856f01 fix typo
R=gri, iant
CC=golang-dev
https://golang.org/cl/183160
2010-01-09 07:32:26 +11:00
Robert Griesemer
30e5ed249d remove reference to "basic literal" since it's never defined
R=rsc, r
CC=golang-dev
https://golang.org/cl/183113
2010-01-04 17:28:02 -08:00
Robert Griesemer
eb109a765d Clarify section on tokens.
Fixes #457.

R=r
CC=golang-dev
https://golang.org/cl/181083
2009-12-28 14:40:42 -08:00
Russ Cox
c1045db1d8 go_spec: use PrimaryExpr as type switch expression
Without this change, the spec parses <-c.(type) as (<-c).(type)
but parses <-c.(int) as <-(c.(int)).

With this change, the former parses as <-(c.(type)).

All three parsers already implement this rule, because
they look for the "type" word during parsing of a standard
type assertion.  This change merely brings the
spec in line with the implementations.

http://code.google.com/p/go/source/browse/src/cmd/gc/go.y#801
http://code.google.com/p/go/source/browse/src/pkg/go/parser/parser.go#900
http://gcc.gnu.org/viewcvs/branches/gccgo/gcc/go/parse.cc?revision=155389&view=markup#l2469

Pointed out by Brett Kail on golang-nuts.

R=gri
CC=golang-dev
https://golang.org/cl/182044
2009-12-23 13:48:44 -08:00
Robert Griesemer
130ac74010 Spec modified to reflect new semicolon rules.
R=rsc, r, iant, ken2
CC=golang-dev
https://golang.org/cl/166066
2009-12-10 16:43:01 -08:00
Russ Cox
2a5f0c67ca spec: document that built-ins cannot be used as func values
R=gri
CC=golang-dev
https://golang.org/cl/164088
2009-12-04 10:23:12 -08:00
Ian Lance Taylor
ccd026486a Add copy to the list of predeclared functions.
R=gri
https://golang.org/cl/164081
2009-12-02 13:26:39 -08:00
Robert Griesemer
e919275825 Integrated feedback by Ken.
Easy stuff in this round, more to come.

R=iant, rsc, r, ken2
https://golang.org/cl/163058
2009-12-01 16:15:53 -08:00
Fazlul Shahriar
330139e3f2 Fix typo in spec
R=golang-dev, rsc
https://golang.org/cl/164052
2009-11-30 21:23:58 -08:00
Rob Pike
ff6a8fd779 mention arrays of arrays and slices of slices
Fixes #113.

R=gri, rsc
CC=golang-dev
https://golang.org/cl/159049
2009-11-20 15:47:15 -08:00
Robert Griesemer
1a8ebcc4b8 Allow optional second expression in slice expressions.
Built-in function copy.
Addresses issue 203.

R=rsc, r, iant
https://golang.org/cl/156089
2009-11-18 19:15:25 -08:00
Robert Griesemer
d3b1565716 - Clarify that struct composite literal keys are field names not selectors.
- Slight re-phrasing of struct type section since "field name" was not
properly introduced.

Fixes #164.

R=r, rsc, iant
https://golang.org/cl/155061
2009-11-16 08:58:55 -08:00
Robert Griesemer
0660d243b1 Use ElementType consistently.
Fixes #173.

R=r, rsc, r1
https://golang.org/cl/154156
2009-11-15 17:42:27 -08:00
Robert Griesemer
13ad5d40c4 Use // to start comment instead of #.
Fixes #189.

R=r
CC=rsc
https://golang.org/cl/155055
2009-11-15 11:33:20 -08:00
Rob Pike
9549eeecd1 add a paragraph about semicolons to the tutorial.
fix a typo caught by kakugawa@gmail.com

Fixes #92.

R=rsc
CC=golang-dev
https://golang.org/cl/152105
2009-11-12 14:10:16 -08:00
Rob Pike
cf16443c69 fix a couple of typos.
add a mention of range to the tutorial.
change tutorial's title.

R=rsc
CC=golang-dev
https://golang.org/cl/152098
2009-11-12 11:05:20 -08:00