Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go/types: package documentation #8195

Closed
adonovan opened this issue Jun 12, 2014 · 2 comments
Closed

go/types: package documentation #8195

adonovan opened this issue Jun 12, 2014 · 2 comments

Comments

@adonovan
Copy link
Member

go/types could use some high-level documentation of the basic concepts (the Type
hierarchy, the Object hierarchy), and how to accomplish various kinds of mappings from
syntax to types and vice versa.  I think tool builders would also appreciate a
discussion of the commonly misunderstood things, with explained examples, such as:
- a list of invariants related to each Type/Object. The docstrings cover some of them
but it doesn't help a new user become oriented.
- the fact the Objects are canonical.
- what's the deal with Tuple.
- what situations Info.Implicits are for
- that fields (Vars) of structs don't know their owning struct and are in fact may be
equally "owned" by several.
- the analogous situation for interface methods.
- why some Idents/FuncTypes/etc appear in Info.Types but not others
- how PkgName objects work, and the possibility that two distinct PkgName objects can
represent the same package.
- that a struct may contain two fields (or an interface two methods) both named
"f"
- that a struct field identifier may be simultaneously use a type and define a field
- how to determine whether an object is universal, file-scope, package scope or local,
and which object kinds can inhabit which scopes.
- etc.
@griesemer
Copy link
Contributor

Comment 1:

Labels changed: added release-none, repo-tools.

Status changed to Accepted.

@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc changed the title go.tools/go.types: package documentation x/tools/go.types: package documentation Apr 14, 2015
@rsc rsc modified the milestones: Unreleased, Unplanned Apr 14, 2015
@rsc rsc removed the repo-tools label Apr 14, 2015
@griesemer griesemer changed the title x/tools/go.types: package documentation go.types: package documentation Jul 31, 2015
@griesemer griesemer changed the title go.types: package documentation go/types: package documentation Jul 31, 2015
@alandonovan
Copy link
Contributor

@golang golang locked and limited conversation to collaborators Feb 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants