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
tour: better explanation about type declarations? #13530
Comments
What about "A EDIT: Better wording. |
Joining this conversation from #14152. I rewrote it as: "A type determines the set of values and operations specific to values of that type. Each declared type has an underlying type that goes back to the basic types discussed earlier. Let's define a type that is also a struct, which is made up of multiple fields." No matter the wording, I'm a fan of 2-3 sentences here. Types turning into types sounds like a Dr Seuss riddle at first. Smaller, simpler sentences help break that down. |
@broady This is a dupe of golang/tour#121 |
@zombiezen Is it?, golang/tour#121, was reported almost a year after this issue, but I agree that the repo where it is reported is probably better suited for this, if that's what you mean. |
CL https://golang.org/cl/36314 mentions this issue. |
Context: https://tour.golang.org/moretypes/2
I just decided to look through the Go tour to see how it explains named types and assignability. As far as I can tell, the only explanation is the parenthetical sentence "And a
type
declaration does what you'd expect."Based on user questions like issue #13529, I suspect that
type
declarations do not necessarily do what users expect, and perhaps it's worth elaborating on this point somehow.The text was updated successfully, but these errors were encountered: