done On Thu, Jul 1, 2010 at 16:23, Rob 'Commander' Pike <r@google.com> wrote: > seems ...
14 years, 10 months ago
(2010-07-01 23:26:10 UTC)
#5
done
On Thu, Jul 1, 2010 at 16:23, Rob 'Commander' Pike <r@google.com> wrote:
> seems good. gri would say "denoting" for "naming" in the new paragraph.
>
> -rob
>
>
fyi http://codereview.appspot.com/1687047/diff/11001/12001 File doc/go_spec.html (right): http://codereview.appspot.com/1687047/diff/11001/12001#newcode533 doc/go_spec.html:533: <code>cap</code> or <code>len</code> applied to a some expressions ...
14 years, 10 months ago
(2010-07-01 23:34:06 UTC)
#6
ptal > http://codereview.appspot.com/1687047/diff/11001/12001#newcode533 > doc/go_spec.html:533: <code>cap</code> or <code>len</code> applied to a > some expressions of ...
14 years, 10 months ago
(2010-07-01 23:37:31 UTC)
#7
ptal
> http://codereview.appspot.com/1687047/diff/11001/12001#newcode533
> doc/go_spec.html:533: <code>cap</code> or <code>len</code> applied to a
> some expressions of array type,
> s/to a some/to/
changed to "to some". some is important; it's not all
> http://codereview.appspot.com/1687047/diff/11001/12001#newcode533
> doc/go_spec.html:533: <code>cap</code> or <code>len</code> applied to a
> some expressions of array type,
> does this need a reference to the section on len, cap?
added reference; see what you think.
http://codereview.appspot.com/1687047/diff/17001/18001 File doc/go_spec.html (right): http://codereview.appspot.com/1687047/diff/17001/18001#newcode4392 doc/go_spec.html:4392: denoting an array. I thought we also allowed pointers?
14 years, 10 months ago
(2010-07-02 00:14:49 UTC)
#9
LGTM http://codereview.appspot.com/1687047/diff/25001/26001 File doc/go_spec.html (right): http://codereview.appspot.com/1687047/diff/25001/26001#newcode4391 doc/go_spec.html:4391: denoting an array or pointer to array. Should ...
14 years, 10 months ago
(2010-07-02 00:21:46 UTC)
#11
> Should one say something like: > > (even if the pointer is nil). > ...
14 years, 10 months ago
(2010-07-02 00:34:25 UTC)
#12
> Should one say something like:
>
> (even if the pointer is nil).
>
> to make it very clear?
i don't have a good way to word it.
also i think it's separate from constants.
len(f()) doesn't crash if f() returns a nil *[5]int either.
there's a recent issue on the issue tracker
about being very clear about when len and
cap can be used on which nil values.
let's leave it for that.
waiting for r and the release before submitting.
Issue 1687047: code review 1687047: spec: len(x) only constant if x is constant
(Closed)
Created 14 years, 10 months ago by rsc
Modified 14 years, 10 months ago
Reviewers:
Base URL:
Comments: 4