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
Rob Pike
0b4de7aa8a
comment out red TODO clauses except for the last one
...
R=rsc
CC=go-dev
http://go/go-review/1024037
2009-11-09 16:09:57 -08:00
Robert Griesemer
fb5fce5532
fix for incorrect composite literal grammar
...
(issue found by ken)
R=go-dev, rsc
http://go/go-review/1025030
2009-11-09 12:35:56 -08:00
Rob Pike
4fe4192ac9
fixes to spec. mostly minor but several of significance.
...
- carriage return is white space
- "" strings cannot span newlines
- f(g()) is ok if g is multivalue and matches f's args
R=rsc, gri
CC=go-dev
http://go/go-review/1024017
2009-11-07 22:00:59 -08:00
Robert Griesemer
30637151c7
remove gccgo restriction with respect to blank identifiers
...
R=iant
CC=go-dev
http://go/go-review/1016032
2009-11-03 15:10:52 -08:00
Rob Pike
9339e0758b
pdf cleanup: fix links, remove internal references.
...
fix link in spec.
R=rsc
CC=go-dev
http://go/go-review/1017013
2009-11-02 15:28:41 -08:00
Robert Griesemer
b691e08e2c
clarify rule for channel send
...
R=rsc
CC=go-dev
http://go/go-review/1018002
2009-10-28 18:17:24 -07:00
Robert Griesemer
90cc4a5949
go/printer:
...
- handle HTML tagging via (client-installable) Stylers
go/doc:
- basic styler support
- some factoring
- ready to contain the search code (but for now excluded)
doc/style.css:
- updated
doc/go_spec.css:
- cleanup: replace deprecated uses of <font> tag with <span> tag
R=rsc
DELTA=302 (160 added, 62 deleted, 80 changed)
OCL=35973
CL=35996
2009-10-22 09:41:38 -07:00
Russ Cox
60ff8cc86f
address bug193 and add note to spec about it.
...
R=ken
OCL=35920
CL=35920
2009-10-20 08:27:14 -07:00
Robert Griesemer
d4d4ff0d83
- method names in method sets/interfaces must be all different
...
- specify evaluation order of floating-point expressions as
discussed
- specify floating point conversion rounding as discussed
- slightly reformatted section on conversions to make it
more readable (hopefully)
- fixed production for interpreted_string_lit - components
were not properly tagged before because of """ instead of `"`
R=go-dev
DELTA=83 (41 added, 11 deleted, 31 changed)
OCL=35864
CL=35885
2009-10-19 13:13:59 -07:00
Robert Griesemer
53440da835
Factored out boilerplate from all html docs in doc directory:
...
- the first HTML comment in those files is extracted as page
title when serving them
- lib/godoc.html is top-level template for all pages served
- experimented a bit with package documentation layout
(feedback welcome)
- various related cleanups
TODO:
- The / page (doc/root.html) content repeats links that are
in the navigation bar. It needs to be cleaned up.
R=rsc
DELTA=826 (86 added, 692 deleted, 48 changed)
OCL=35230
CL=35245
2009-10-01 14:08:00 -07:00
Robert Griesemer
164a7bceeb
- completed section on built-in functions
...
- moved Conversions section out of built-in functions and into expressions
- fixed syntax of conversions (parens are not mandatory if the type is not a TypeName)
(this is the only change to the Conversions section; the rest of the text is just moved;
old line: 4043, new line: 3078)
- fixed syntax of composite literals (parens are allowed around LiteralType)
DELTA=239 (115 added, 98 deleted, 26 changed)
OCL=35118
CL=35159
2009-09-30 12:00:25 -07:00
Rob Pike
69d13b2332
make the sidebars consistent
...
add Effective Go to the set of links
DELTA=166 (62 added, 57 deleted, 47 changed)
OCL=35085
CL=35089
2009-09-29 11:57:28 -07:00
Robert Griesemer
326ef13976
- assignments to structs are only legal if all struct fields are visible
...
- removed section on Multiple-file packages as this seems now now covered
sufficiently elsewhere
DELTA=45 (11 added, 25 deleted, 9 changed)
OCL=35065
CL=35071
2009-09-28 19:21:15 -07:00
Russ Cox
13dac655cb
disallow interface {x, y()}
...
R=gri
DELTA=8 (3 added, 0 deleted, 5 changed)
OCL=35045
CL=35047
2009-09-28 14:16:33 -07:00
Robert Griesemer
fc61b77754
- clarify type declaration (specifying status quo)
...
DELTA=68 (51 added, 8 deleted, 9 changed)
OCL=35038
CL=35046
2009-09-28 14:10:20 -07:00
Rob Pike
3aec2e46de
rewrite the section about imports
...
DELTA=42 (10 added, 11 deleted, 21 changed)
OCL=35017
CL=35020
2009-09-25 17:00:22 -07:00
Robert Griesemer
997851e681
- reworked section on import declarations
...
- added missing <p> tags in various places
DELTA=62 (32 added, 4 deleted, 26 changed)
OCL=35014
CL=35014
2009-09-25 15:36:25 -07:00