Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
b34f0551
Commit
b34f0551
authored
Apr 03, 2013
by
Robert Griesemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
spec: Go has no 'reference types'
R=golang-dev, r CC=golang-dev
https://golang.org/cl/8288044
parent
839c4f01
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
go_spec.html
doc/go_spec.html
+4
-6
No files found.
doc/go_spec.html
View file @
b34f0551
<!--{
<!--{
"Title": "The Go Programming Language Specification",
"Title": "The Go Programming Language Specification",
"Subtitle": "Version of
March 22
, 2013",
"Subtitle": "Version of
April 3
, 2013",
"Path": "/ref/spec"
"Path": "/ref/spec"
}-->
}-->
...
@@ -837,9 +837,9 @@ multi-dimensional types.
...
@@ -837,9 +837,9 @@ multi-dimensional types.
<h3
id=
"Slice_types"
>
Slice types
</h3>
<h3
id=
"Slice_types"
>
Slice types
</h3>
<p>
<p>
A slice is a
reference to
a contiguous segment of an array and
A slice is a
descriptor for
a contiguous segment of an array and
contains a numbered sequence of elements from that array. A slice
provides access to a numbered sequence of elements from that array.
type denotes the set of all slices of arrays of its element type.
A slice
type denotes the set of all slices of arrays of its element type.
The value of an uninitialized slice is
<code>
nil
</code>
.
The value of an uninitialized slice is
<code>
nil
</code>
.
</p>
</p>
...
@@ -5197,8 +5197,6 @@ of the memory.
...
@@ -5197,8 +5197,6 @@ of the memory.
<h3
id=
"Making_slices_maps_and_channels"
>
Making slices, maps and channels
</h3>
<h3
id=
"Making_slices_maps_and_channels"
>
Making slices, maps and channels
</h3>
<p>
<p>
Slices, maps and channels are reference types that do not require the
extra indirection of an allocation with
<code>
new
</code>
.
The built-in function
<code>
make
</code>
takes a type
<code>
T
</code>
,
The built-in function
<code>
make
</code>
takes a type
<code>
T
</code>
,
which must be a slice, map or channel type,
which must be a slice, map or channel type,
optionally followed by a type-specific list of expressions.
optionally followed by a type-specific list of expressions.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment