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

spec: Representability reversed examples (byte, rune) #28847

Closed
bgadrian opened this issue Nov 17, 2018 · 2 comments
Closed

spec: Representability reversed examples (byte, rune) #28847

bgadrian opened this issue Nov 17, 2018 · 2 comments

Comments

@bgadrian
Copy link

I think I have found a small problem with the Specs page from the blog.

https://golang.org/ref/spec#Representability

What did you expect to see?

'a' rune rune is an alias for int32, and 97 is in the set of 32-bit integers
97 byte 97 is in the set of byte values

What did you see instead?

'a' byte 97 is in the set of byte values
97 rune rune is an alias for int32, and 97 is in the set of 32-bit integers

@robpike
Copy link
Contributor

robpike commented Nov 17, 2018

The table is saying that 'a' can be represented by a byte, not that its default representation has byte type.

@bgadrian
Copy link
Author

I understand now, sorry for the confusion.

@golang golang locked and limited conversation to collaborators Nov 18, 2019
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

3 participants