https://codereview.appspot.com/7450043/diff/3001/prog/for-continued.go File prog/for-continued.go (right): https://codereview.appspot.com/7450043/diff/3001/prog/for-continued.go#newcode7 prog/for-continued.go:7: for ; sum < 1000; { am i missing ...
11 years, 2 months ago
(2013-02-28 19:17:50 UTC)
#2
https://codereview.appspot.com/7450043/diff/3001/prog/for-continued.go File prog/for-continued.go (right): https://codereview.appspot.com/7450043/diff/3001/prog/for-continued.go#newcode7 prog/for-continued.go:7: for ; sum < 1000; { They are equivalent, ...
11 years, 2 months ago
(2013-02-28 19:20:02 UTC)
#3
https://codereview.appspot.com/7450043/diff/3001/prog/for-continued.go
File prog/for-continued.go (right):
https://codereview.appspot.com/7450043/diff/3001/prog/for-continued.go#newcode7
prog/for-continued.go:7: for ; sum < 1000; {
They are equivalent, that's the point of the slide, showing that the for loop
can be simplified dropping the initial and inductive step.
The next slide says these semicolons are not needed anymore and drops them.
On 2013/02/28 19:17:51, minux wrote:
> am i missing something here? i think they are
> equivalent.
>
> Or, put it another way, if they aren't then
> gofmt has a serious bug.
On Fri, Mar 1, 2013 at 3:20 AM, <campoy@google.com> wrote: > > https://codereview.appspot.**com/7450043/diff/3001/prog/** > for-continued.go#newcode7<https://codereview.appspot.com/7450043/diff/3001/prog/for-continued.go#newcode7> ...
11 years, 2 months ago
(2013-02-28 19:34:45 UTC)
#5
On Fri, Mar 1, 2013 at 3:20 AM, <campoy@google.com> wrote:
>
> https://codereview.appspot.**com/7450043/diff/3001/prog/**
>
for-continued.go#newcode7<https://codereview.appspot.com/7450043/diff/3001/prog/for-continued.go#newcode7>
> prog/for-continued.go:7: for ; sum < 1000; {
> They are equivalent, that's the point of the slide, showing that the for
> loop can be simplified dropping the initial and inductive step.
>
> The next slide says these semicolons are not needed anymore and drops
> them.
ok i see. LGTM.
too bad we can't just inline the code in the article.
*** Submitted as https://code.google.com/p/go-tour/source/detail?r=dd4f0b547fbc *** go-tour: Adding semicolons that were dropped by gofmt R=golang-dev, minux.ma, ...
11 years, 2 months ago
(2013-02-28 20:40:08 UTC)
#6
Issue 7450043: code review 7450043: go-tour: Adding semicolons that were dropped by gofmt
(Closed)
Created 11 years, 2 months ago by campoy
Modified 11 years, 2 months ago
Reviewers:
Base URL:
Comments: 2