From bcdc247f28a1662485afbebc36d31846a867f64d Mon Sep 17 00:00:00 2001
From: Russ Cox
Date: Thu, 16 Apr 2009 23:06:48 -0700
Subject: [PATCH] spec edits for array slice change
R=r
DELTA=6 (0 added, 2 deleted, 4 changed)
OCL=27532
CL=27582
---
doc/go_spec.html | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/doc/go_spec.html b/doc/go_spec.html
index 01e6e484bf..c62a168b1f 100644
--- a/doc/go_spec.html
+++ b/doc/go_spec.html
@@ -1265,9 +1265,8 @@ be assigned to different types:
The predeclared constant nil
can be assigned to any
pointer, function, slice, map, channel, or interface variable.
-Arrays can be assigned to slice variables with equal element type.
-When assigning to a slice variable, the array is not copied but a
-slice comprising the entire array is created.
+A pointer to an array can be assigned to a slice variable with equal element type.
+The slice variable then refers to the original array; the data is not copied.
A value can be assigned to an interface variable if the static
@@ -3006,7 +3005,7 @@ of which happen before receiving the value from the channel
c
.
However, the order of those events compared to the evaluation of
f
, the evaluation of x
, and the indexing
-of x
by the return value of
+of x
by the return value of
i()
is not specified.
@@ -3896,7 +3895,6 @@ result. TODO: clarify?
4a) Converting an integer value yields a string containing the UTF-8
representation of the integer.
-(TODO: this one could be done just as well by a library.)
string(0x65e5) // "\u65e5"
@@ -3904,8 +3902,8 @@ string(0x65e5) // "\u65e5"
-4b) Converting an array or slice of bytes yields a string whose successive
-bytes are those of the array/slice.
+4b) Converting a slice of bytes yields a string whose successive
+bytes are those of the slice.
string([]byte{'h', 'e', 'l', 'l', 'o'}) // "hello"
--
2.48.1