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

Issue 5700068: code review 5700068: go spec: inside functions, variables must be evaluated. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 2 months ago by gri
Modified:
12 years, 1 month ago
Reviewers:
rog
CC:
r, rsc, iant, ken2, remyoudompheng, ken3, r2, golang-dev
Visibility:
Public.

Description

go spec: inside functions, variables must be evaluated. Fixes issue 1612.

Patch Set 1 #

Total comments: 1

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

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

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

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

Patch Set 6 : diff -r c4bd8c697c5b https://code.google.com/p/go #

Patch Set 7 : diff -r c4bd8c697c5b https://code.google.com/p/go #

Patch Set 8 : diff -r c4bd8c697c5b https://code.google.com/p/go #

Patch Set 9 : diff -r c4bd8c697c5b https://code.google.com/p/go #

Total comments: 1

Patch Set 10 : diff -r c4bd8c697c5b https://code.google.com/p/go #

Patch Set 11 : diff -r c4bd8c697c5b https://code.google.com/p/go #

Total comments: 2

Patch Set 12 : diff -r eabeb88b4bb7 https://code.google.com/p/go #

Total comments: 1

Patch Set 13 : diff -r eabeb88b4bb7 https://code.google.com/p/go #

Patch Set 14 : diff -r eabeb88b4bb7 https://code.google.com/p/go #

Patch Set 15 : diff -r d33448c0216e https://code.google.com/p/go #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -4 lines) Patch
M doc/go_spec.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +13 lines, -4 lines 2 comments Download

Messages

Total messages: 37
gri
Hello r, rsc, iant, ken2 (cc: golang-dev@googlegroups.com), I'd like you to review this change to ...
12 years, 2 months ago (2012-02-24 23:39:26 UTC) #1
r
http://codereview.appspot.com/5700068/diff/1/doc/go_spec.html File doc/go_spec.html (right): http://codereview.appspot.com/5700068/diff/1/doc/go_spec.html#newcode1839 doc/go_spec.html:1839: it is illegal to declare a variable that is ...
12 years, 2 months ago (2012-02-24 23:49:04 UTC) #2
gri
PTAL. This time w/ a proposal for the notion of an RhsExpr that would permit ...
12 years, 2 months ago (2012-02-25 01:10:04 UTC) #3
r
i like the general idea but feel it's too sweeping a change to do quickly. ...
12 years, 2 months ago (2012-02-25 01:35:25 UTC) #4
gri
On Fri, Feb 24, 2012 at 5:35 PM, <r@golang.org> wrote: > i like the general ...
12 years, 2 months ago (2012-02-25 02:54:15 UTC) #5
remyoudompheng
On 2012/02/25 01:35:25, r wrote: > i think if you change 'read' to 'evaluated' in ...
12 years, 2 months ago (2012-02-25 10:27:35 UTC) #6
gri
Yes On Feb 25, 2012 2:27 AM, <remyoudompheng@gmail.com> wrote: > On 2012/02/25 01:35:25, r wrote: ...
12 years, 2 months ago (2012-02-25 17:24:44 UTC) #7
gri
Hello r@golang.org, rsc@golang.org, iant@golang.org, ken@golang.org, remyoudompheng@gmail.com (cc: golang-dev@googlegroups.com), Please take another look.
12 years, 2 months ago (2012-02-27 23:44:59 UTC) #8
gri
Hello r@golang.org, rsc@golang.org, iant@golang.org, ken@golang.org, remyoudompheng@gmail.com (cc: golang-dev@googlegroups.com), Please take another look.
12 years, 2 months ago (2012-02-27 23:46:04 UTC) #9
r
LGTM i like this simplicity and think it works
12 years, 2 months ago (2012-02-27 23:49:56 UTC) #10
rsc
http://codereview.appspot.com/5700068/diff/4002/doc/go_spec.html File doc/go_spec.html (right): http://codereview.appspot.com/5700068/diff/4002/doc/go_spec.html#newcode1839 doc/go_spec.html:1839: it is illegal to declare a variable that is ...
12 years, 2 months ago (2012-02-28 15:38:33 UTC) #11
gri
PTAL. Also added missing links to (short) variable declarations where variables are declared so that ...
12 years, 2 months ago (2012-02-28 19:31:42 UTC) #12
rsc
LGTM but wait for Ian. I am not completely confident about this, but it seems ...
12 years, 2 months ago (2012-02-28 19:52:53 UTC) #13
remyoudompheng
I may be a bit stubborn but still annoyed by the case of var a ...
12 years, 2 months ago (2012-02-28 20:38:37 UTC) #14
rsc
> var a [2]int > _ = len(a) I have no problem with making this ...
12 years, 2 months ago (2012-02-28 20:41:29 UTC) #15
gri
I think it would be fine given the existing spec and this rule to make ...
12 years, 2 months ago (2012-02-28 20:43:56 UTC) #16
ken3
i am uncomfortable with the increasing cross-product of normal functions being diagnosed as special cases. ...
12 years, 2 months ago (2012-02-28 20:56:54 UTC) #17
rsc
On Tue, Feb 28, 2012 at 15:56, Ken Thompson <ken@google.com> wrote: > i am uncomfortable ...
12 years, 2 months ago (2012-02-28 21:02:55 UTC) #18
r2
i wonder (not yet suggest) if we should make set-and-not-used be like the return thing ...
12 years, 2 months ago (2012-02-28 21:09:17 UTC) #19
gri
There is also the alternative route - which I have abandoned because it was a ...
12 years, 2 months ago (2012-02-28 21:16:54 UTC) #20
r2
On 29/02/2012, at 8:16 AM, Robert Griesemer wrote: > There is also the alternative route ...
12 years, 2 months ago (2012-02-28 21:32:41 UTC) #21
gri
I am inclined to leave the CL as is. I am not bothered by the ...
12 years, 2 months ago (2012-02-28 21:35:57 UTC) #22
rsc
> I am not bothered by the len(a) case. It's minor compared to some > ...
12 years, 2 months ago (2012-02-28 21:37:32 UTC) #23
r2
On 29/02/2012, at 8:37 AM, Russ Cox wrote: >> I am not bothered by the ...
12 years, 2 months ago (2012-02-28 21:41:53 UTC) #24
rsc
I'm leaning toward leaving this unspecified now too.
12 years, 2 months ago (2012-02-28 21:42:42 UTC) #25
r2
On 29/02/2012, at 8:42 AM, Russ Cox wrote: > I'm leaning toward leaving this unspecified ...
12 years, 2 months ago (2012-02-28 21:45:08 UTC) #26
iant
http://codereview.appspot.com/5700068/diff/22002/doc/go_spec.html File doc/go_spec.html (right): http://codereview.appspot.com/5700068/diff/22002/doc/go_spec.html#newcode1838 doc/go_spec.html:1838: Inside a <a href="#Function_declarations">function</a> <a href="#Body">body</a>, where is the ...
12 years, 2 months ago (2012-02-28 21:46:23 UTC) #27
gri
PTAL. Rephrased as implementation restriction. Perhaps this is better? - gri On Tue, Feb 28, ...
12 years, 2 months ago (2012-02-28 21:51:30 UTC) #28
rsc
http://codereview.appspot.com/5700068/diff/26002/doc/go_spec.html File doc/go_spec.html (right): http://codereview.appspot.com/5700068/diff/26002/doc/go_spec.html#newcode1840 doc/go_spec.html:1840: if the variable is never evaluated and never has ...
12 years, 2 months ago (2012-02-28 21:52:30 UTC) #29
gri
PTAL. - gri On Tue, Feb 28, 2012 at 1:52 PM, <rsc@golang.org> wrote: > > ...
12 years, 2 months ago (2012-02-28 21:54:02 UTC) #30
rsc
LGTM
12 years, 2 months ago (2012-02-28 21:58:37 UTC) #31
r2
LGTM On Wednesday, February 29, 2012, wrote: > LGTM > > > http://codereview.appspot.com/**5700068/<http://codereview.appspot.com/5700068/> >
12 years, 2 months ago (2012-02-28 22:05:08 UTC) #32
iant
LGTM
12 years, 2 months ago (2012-02-28 22:10:44 UTC) #33
gri
*** Submitted as http://code.google.com/p/go/source/detail?r=7ff2bf9b131a *** go spec: inside functions, variables must be evaluated. Fixes issue ...
12 years, 1 month ago (2012-02-29 01:44:27 UTC) #34
rog
http://codereview.appspot.com/5700068/diff/25003/doc/go_spec.html File doc/go_spec.html (right): http://codereview.appspot.com/5700068/diff/25003/doc/go_spec.html#newcode4248 doc/go_spec.html:4248: The iteration variables may be declared by the "range" ...
12 years, 1 month ago (2012-02-29 12:36:16 UTC) #35
gri
http://codereview.appspot.com/5700068/diff/25003/doc/go_spec.html File doc/go_spec.html (right): http://codereview.appspot.com/5700068/diff/25003/doc/go_spec.html#newcode4248 doc/go_spec.html:4248: The iteration variables may be declared by the "range" ...
12 years, 1 month ago (2012-02-29 16:21:57 UTC) #36
rog
12 years, 1 month ago (2012-02-29 17:08:58 UTC) #37
sorry, i missed that.

On 29 February 2012 16:21,  <gri@golang.org> wrote:
>
> http://codereview.appspot.com/5700068/diff/25003/doc/go_spec.html
> File doc/go_spec.html (right):
>
> http://codereview.appspot.com/5700068/diff/25003/doc/go_spec.html#newcode4248
> doc/go_spec.html:4248: The iteration variables may be declared by the
> "range" using a form of
> On 2012/02/29 12:36:16, rog wrote:
>>
>> this looks like a mistake.
>
>
> See: http://codereview.appspot.com/5706065
>
> http://codereview.appspot.com/5700068/
Sign in to reply to this message.

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