Code review - Issue 163058: code review 163058: Integrated feedback by Ken.https://codereview.appspot.com/2009-12-02T09:51:42+00:00rietveld
Message from unknown
2009-12-01T22:54:53+00:00griurn:md5:1023af6c652f89e0ddca7ad7688f8d88
Message from unknown
2009-12-01T22:56:02+00:00griurn:md5:a3a25e06701eefae609c80a817caf7cb
Message from gri@golang.org
2009-12-01T22:56:04+00:00griurn:md5:c7179ed3fb36db611dd05a21d4ec7026
Hello iant, rsc, r, ken2 (cc: gri),
I'd like you to review the following change.
Message from rsc@golang.org
2009-12-01T23:18:57+00:00rscurn:md5:d01558814df7c28aa2c4536b90dcad21
LGTM
http://codereview.appspot.com/163058/diff/3/4
File doc/go_spec.html (right):
http://codereview.appspot.com/163058/diff/3/4#newcode542
doc/go_spec.html:542: The value of an n-bit integer is n bits wide and represented using a
s/a two's complement system/two's complement/
http://codereview.appspot.com/163058/diff/3/4#newcode3204
doc/go_spec.html:3204: int(3.14) // 3.14 truncated to int 3
This comment suggests a truncation is happening - I had
to look back a few lines to see that this was a list of illegal
expressions.
// 3.14 cannot be represented as an int
http://codereview.appspot.com/163058/diff/3/4#newcode3306
doc/go_spec.html:3306: A statement list can always be terminated with a semicolon in effect
s/semicolon/&,/
http://codereview.appspot.com/163058/diff/3/4#newcode3467
doc/go_spec.html:3467: IfStmt = "if" [ [ SimpleStmt ] ";" ] [ Expression ] Block [ "else" Statement ] .
SimpleStmt can be EmptyStmt, so I think the extra [ ]
are unnecessary. They're fine if they're just for emphasis.
Message from r@golang.org
2009-12-01T23:25:54+00:00rurn:md5:967434b1ac57ac5c26f1666ccc6ec40d
http://codereview.appspot.com/163058/diff/3/4
File doc/go_spec.html (right):
http://codereview.appspot.com/163058/diff/3/4#newcode352
doc/go_spec.html:352: and two-digit hexadecimal (<code>\xnn</code>) escapes represent individual
i prefer the original
http://codereview.appspot.com/163058/diff/3/4#newcode450
doc/go_spec.html:450: For instance, <code>3.0</code> can be given any integer and any
s/and/or/
http://codereview.appspot.com/163058/diff/3/4#newcode542
doc/go_spec.html:542: The value of an n-bit integer is n bits wide and represented using a
n should be <i>
Message from r@golang.org
2009-12-01T23:26:03+00:00rurn:md5:b88494b78192d82a0abfffba0696ea1e
LGTM
Message from unknown
2009-12-01T23:40:47+00:00griurn:md5:1fe5a3e61d8e953b2d6935fa81d19052
Message from gri@golang.org
2009-12-01T23:41:27+00:00griurn:md5:426c1a276df2ed65111707896b23fa6d
PTAL.
http://codereview.appspot.com/163058/diff/3/4
File doc/go_spec.html (right):
http://codereview.appspot.com/163058/diff/3/4#newcode352
doc/go_spec.html:352: and two-digit hexadecimal (<code>\xnn</code>) escapes represent individual
On 2009/12/01 23:25:54, r wrote:
> i prefer the original
made the n's <i>
http://codereview.appspot.com/163058/diff/3/4#newcode450
doc/go_spec.html:450: For instance, <code>3.0</code> can be given any integer and any
On 2009/12/01 23:25:54, r wrote:
> s/and/or/
Done.
http://codereview.appspot.com/163058/diff/3/4#newcode542
doc/go_spec.html:542: The value of an n-bit integer is n bits wide and represented using a
On 2009/12/01 23:18:57, rsc wrote:
> s/a two's complement system/two's complement/
>
technically this is not correct: two's complement is a specific value (see the link).
http://codereview.appspot.com/163058/diff/3/4#newcode542
doc/go_spec.html:542: The value of an n-bit integer is n bits wide and represented using a
On 2009/12/01 23:25:54, r wrote:
> n should be <i>
Done.
http://codereview.appspot.com/163058/diff/3/4#newcode3204
doc/go_spec.html:3204: int(3.14) // 3.14 truncated to int 3
On 2009/12/01 23:18:57, rsc wrote:
> This comment suggests a truncation is happening - I had
> to look back a few lines to see that this was a list of illegal
> expressions.
>
> // 3.14 cannot be represented as an int
>
Done.
http://codereview.appspot.com/163058/diff/3/4#newcode3306
doc/go_spec.html:3306: A statement list can always be terminated with a semicolon in effect
On 2009/12/01 23:18:57, rsc wrote:
> s/semicolon/&,/
>
Done.
http://codereview.appspot.com/163058/diff/3/4#newcode3467
doc/go_spec.html:3467: IfStmt = "if" [ [ SimpleStmt ] ";" ] [ Expression ] Block [ "else" Statement ] .
On 2009/12/01 23:18:57, rsc wrote:
> SimpleStmt can be EmptyStmt, so I think the extra [ ]
> are unnecessary. They're fine if they're just for emphasis.
>
Sigh. We went back and forth here. Reverted.
Message from unknown
2009-12-01T23:56:47+00:00griurn:md5:c4c06acbf0417f9d842b74117d657b83
Message from rsc@golang.org
2009-12-02T00:00:24+00:00rscurn:md5:a7ccbece4fb8d1aca4f5a23c4fe098c2
> technically this is not correct: two's complement is a specific value
> (see the link).
how about "two's complement arithmetic"? (wikipedia-approved)
the "a" in "a two's complement system"
makes it sound like there are other,
different two's complement systems.
Message from gri@golang.org
2009-12-02T00:14:58+00:00griurn:md5:1d37e69d13df11f6ecdae639320f9a43
sounds good.
On Tuesday, December 1, 2009, Russ Cox <rsc@golang.org> wrote:
>> technically this is not correct: two's complement is a specific value
>> (see the link).
>
> how about "two's complement arithmetic"? (wikipedia-approved)
> the "a" in "a two's complement system"
> makes it sound like there are other,
> different two's complement systems.
>
Message from unknown
2009-12-02T00:15:48+00:00griurn:md5:fe310e926c06c0dedd233b25625a384d
Message from gri@golang.org
2009-12-02T00:15:55+00:00griurn:md5:722fcd2c6b9f07d10cdd18af10045d04
*** Submitted as http://code.google.com/p/go/source/detail?r=e6cf652c263f ***
Integrated feedback by Ken.
Easy stuff in this round, more to come.
R=iant, rsc, r, ken2
http://codereview.appspot.com/163058
Message from rsc@golang.org
2009-12-02T09:51:42+00:00rscurn:md5:7b4d10c9f913fb1e51477cc5a729cf50