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

Issue 5711043: code review 5711043: spec: clarifications around exports (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years ago by gri
Modified:
13 years ago
Reviewers:
CC:
r, rsc, iant, ken2, golang-dev
Visibility:
Public.

Description

spec: clarifications around exports, uniqueness of identifiers - Define what it means for two identifiers to be unique. - The current spec is incorrect about exported identifiers: for instance, it excluded fields of non-exported types of exported variables from being exported. It is easier to leave the detailed specification away and let the rest of the spec govern access of exported identifiers. - The current spec is incorrect about qualified identifiers: It simply required that an identifier be exported to be valid in a qualified identifier. However, qualified identifiers can only access exported identifiers declared in the package block of the imported package. Fixes issue 1551.

Patch Set 1 #

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

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

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

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

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

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

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

Total comments: 4

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

Total comments: 4

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

Total comments: 2

Patch Set 11 : diff -r 4aa8b95bb2bf https://go.googlecode.com/hg/ #

Patch Set 12 : diff -r 4aa8b95bb2bf https://go.googlecode.com/hg/ #

Patch Set 13 : diff -r 4aa8b95bb2bf https://go.googlecode.com/hg/ #

Total comments: 2

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

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

Total comments: 2

Patch Set 16 : diff -r 0e0a2d1892f4 https://code.google.com/p/go #

Patch Set 17 : diff -r 0e0a2d1892f4 https://code.google.com/p/go #

Patch Set 18 : diff -r d24367f1807f https://code.google.com/p/go #

Total comments: 2

Patch Set 19 : diff -r d24367f1807f https://code.google.com/p/go #

Total comments: 1

Patch Set 20 : diff -r 60df364bae52 https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -31 lines) Patch
M doc/go_spec.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 10 chunks +47 lines, -31 lines 0 comments Download

Messages

Total messages: 19
gri
Hello r@golang.org, rsc@golang.org, iant@golang.org, ken@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to ...
13 years ago (2012-02-29 20:59:43 UTC) #1
iant2
LGTM gri@golang.org writes: > Reviewers: r, rsc, iant, ken2, > > Message: > Hello r@golang.org, ...
13 years ago (2012-02-29 21:15:53 UTC) #2
r
http://codereview.appspot.com/5711043/diff/7001/doc/go_spec.html File doc/go_spec.html (right): http://codereview.appspot.com/5711043/diff/7001/doc/go_spec.html#newcode1568 doc/go_spec.html:1568: Identifiers that start with a Unicode upper case letter ...
13 years ago (2012-02-29 21:21:45 UTC) #3
rsc
The implementation in 6g and, I believe, in gccgo is this: A non-uppercase name that ...
13 years ago (2012-02-29 21:29:38 UTC) #4
gri
On Wed, Feb 29, 2012 at 1:29 PM, Russ Cox <rsc@golang.org> wrote: > The implementation ...
13 years ago (2012-02-29 21:32:38 UTC) #5
gri
PTAL http://codereview.appspot.com/5711043/diff/7001/doc/go_spec.html File doc/go_spec.html (right): http://codereview.appspot.com/5711043/diff/7001/doc/go_spec.html#newcode1568 doc/go_spec.html:1568: Identifiers that start with a Unicode upper case ...
13 years ago (2012-02-29 22:53:07 UTC) #6
r
http://codereview.appspot.com/5711043/diff/4005/doc/go_spec.html File doc/go_spec.html (right): http://codereview.appspot.com/5711043/diff/4005/doc/go_spec.html#newcode1577 doc/go_spec.html:1577: are called <i>exported</i>. All other identifiers are called <i>non-exported</i>. ...
13 years ago (2012-03-01 00:46:14 UTC) #7
gri
PTAL http://codereview.appspot.com/5711043/diff/4005/doc/go_spec.html File doc/go_spec.html (right): http://codereview.appspot.com/5711043/diff/4005/doc/go_spec.html#newcode1577 doc/go_spec.html:1577: are called <i>exported</i>. All other identifiers are called ...
13 years ago (2012-03-01 01:56:31 UTC) #8
r
http://codereview.appspot.com/5711043/diff/3006/doc/go_spec.html File doc/go_spec.html (right): http://codereview.appspot.com/5711043/diff/3006/doc/go_spec.html#newcode1584 doc/go_spec.html:1584: expression starting with an identifier declared in the package ...
13 years ago (2012-03-01 03:07:59 UTC) #9
gri
PTAL. - gri http://codereview.appspot.com/5711043/diff/3006/doc/go_spec.html File doc/go_spec.html (right): http://codereview.appspot.com/5711043/diff/3006/doc/go_spec.html#newcode1584 doc/go_spec.html:1584: expression starting with an identifier declared ...
13 years ago (2012-03-01 04:11:39 UTC) #10
r
this is close. i'll let others chime in now, but i'm happy enough
13 years ago (2012-03-01 04:15:43 UTC) #11
iant
http://codereview.appspot.com/5711043/diff/3007/doc/go_spec.html File doc/go_spec.html (right): http://codereview.appspot.com/5711043/diff/3007/doc/go_spec.html#newcode1584 doc/go_spec.html:1584: or denotes a struct field or method.</li> Perhaps write ...
13 years ago (2012-03-01 05:04:17 UTC) #12
rsc
I like this a lot. The CL description says towards fixing 1551 but I think ...
13 years ago (2012-03-01 16:39:29 UTC) #13
gri
PTAL. Changed the section on "Equality of identifiers" to define "Uniqueness of identifiers" instead. We ...
13 years ago (2012-03-01 18:24:35 UTC) #14
rsc
LGTM http://codereview.appspot.com/5711043/diff/6012/doc/go_spec.html File doc/go_spec.html (right): http://codereview.appspot.com/5711043/diff/6012/doc/go_spec.html#newcode1596 doc/go_spec.html:1596: Given a set of identifiers, the identifiers are ...
13 years ago (2012-03-01 18:41:40 UTC) #15
gri
PTAL. http://codereview.appspot.com/5711043/diff/6012/doc/go_spec.html File doc/go_spec.html (right): http://codereview.appspot.com/5711043/diff/6012/doc/go_spec.html#newcode1596 doc/go_spec.html:1596: Given a set of identifiers, the identifiers are ...
13 years ago (2012-03-01 18:47:25 UTC) #16
iant
LGTM
13 years ago (2012-03-01 19:01:57 UTC) #17
r
LGTM it's a bit lawyery and takes hard thinking, but i believe it works http://codereview.appspot.com/5711043/diff/3012/doc/go_spec.html ...
13 years ago (2012-03-01 21:38:20 UTC) #18
gri
13 years ago (2012-03-01 21:57:54 UTC) #19
*** Submitted as http://code.google.com/p/go/source/detail?r=51404e3bab77 ***

spec: clarifications around exports, uniqueness of identifiers

- Define what it means for two identifiers to be unique.

- The current spec is incorrect about exported
identifiers: for instance, it excluded fields
of non-exported types of exported variables
from being exported. It is easier to leave
the detailed specification away and let the
rest of the spec govern access of exported
identifiers.

- The current spec is incorrect about qualified
identifiers: It simply required that an identifier
be exported to be valid in a qualified identifier.
However, qualified identifiers can only access
exported identifiers declared in the package
block of the imported package.

Fixes issue 1551.

R=r, rsc, iant, ken
CC=golang-dev
http://codereview.appspot.com/5711043
Sign in to reply to this message.

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