Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4226)

Issue 6899045: code review 6899045: spec: constant indexes and array/slice sizes must fit i... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 4 months ago by gri
Modified:
11 years, 4 months ago
Reviewers:
CC:
golang-dev
Visibility:
Public.

Description

spec: constant indexes and array/slice sizes must fit into int64 also: - consistently use 'indexes' rather than 'indices' This CL refines earlier CLs 6725053 and 6699048. Restricting the maximum value for integer indices to 1<<63-1 ("MaxInt64") is reasonable and permits more compile-time checks (and a simpler implementation). The compilers have implemented similar restrictions early on, so this is unlikely to cause existing programs to break.

Patch Set 1 #

Patch Set 2 : diff -r a5efcd1675eb https://code.google.com/p/go #

Patch Set 3 : diff -r a5efcd1675eb https://code.google.com/p/go #

Patch Set 4 : diff -r a5efcd1675eb https://code.google.com/p/go #

Patch Set 5 : diff -r a5efcd1675eb https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -24 lines) Patch
M doc/go_spec.html View 1 2 3 4 11 chunks +32 lines, -24 lines 0 comments Download

Messages

Total messages: 16
gri
Hello rsc@golang.org, iant@golang.org, r@golang.org, ken@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to ...
11 years, 4 months ago (2012-12-06 21:10:30 UTC) #1
r
The plural of index in a mathematical context is 'indices'. The plural of index in ...
11 years, 4 months ago (2012-12-06 21:30:04 UTC) #2
rsc
We have been going back and forth on indices and indexes. Indexes is a common ...
11 years, 4 months ago (2012-12-06 21:37:18 UTC) #3
remyoudompheng
On 2012/12/6 Russ Cox <rsc@golang.org> wrote: > We have been going back and forth on ...
11 years, 4 months ago (2012-12-06 21:43:53 UTC) #4
rsc
> But nobody is trying to make: > > package main > import "fmt" > ...
11 years, 4 months ago (2012-12-06 22:19:25 UTC) #5
rsc
(Right.)
11 years, 4 months ago (2012-12-06 22:19:42 UTC) #6
r
Index is a Latin-rooted word with a Latin plural. To use 'indexes' rather than 'indices' ...
11 years, 4 months ago (2012-12-07 04:45:14 UTC) #7
iant2
On Thu, Dec 6, 2012 at 8:45 PM, Rob Pike <r@golang.org> wrote: > Index is ...
11 years, 4 months ago (2012-12-07 05:09:42 UTC) #8
r
I like your example. I remain nervous about the specificity of int64 but it seems ...
11 years, 4 months ago (2012-12-07 06:06:27 UTC) #9
gri
[re-sending, this time to all] I think the example is broken. That can be written ...
11 years, 4 months ago (2012-12-07 06:19:59 UTC) #10
iant2
On Thu, Dec 6, 2012 at 10:19 PM, Robert Griesemer <gri@golang.org> wrote: > > I ...
11 years, 4 months ago (2012-12-07 06:36:38 UTC) #11
gri
It should be int64 of course. Same argument applies. On Dec 6, 2012 10:36 PM, ...
11 years, 4 months ago (2012-12-07 06:58:02 UTC) #12
gri1
So, what I should have written: var n int64 = 1 << 16 if ...
11 years, 4 months ago (2012-12-07 07:07:53 UTC) #13
rsc
You can write it, you just have to write var n int64 (not that most ...
11 years, 4 months ago (2012-12-07 07:29:06 UTC) #14
rsc
This one's dead, right? Removing reviewers.
11 years, 4 months ago (2012-12-11 15:45:39 UTC) #15
gri
11 years, 4 months ago (2012-12-12 19:09:18 UTC) #16
*** Abandoned ***
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b