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

proposal: Go 2: change len, cap, unsafe.Sizeof, unsafe.OffsetOf to return untyped constants if constant #31795

Open
griesemer opened this issue May 2, 2019 · 1 comment

Comments

Projects
None yet
4 participants
@griesemer
Copy link
Contributor

commented May 2, 2019

Reminder issue.

Can we change len, cap, etc. to return an untyped value rather than an int if they are constant expressions? Investigate if this is possible in a backward-compatible way.

@bradfitz

This comment has been minimized.

Copy link
Member

commented May 7, 2019

And unsafe.Sizeof etc.

@ianlancetaylor ianlancetaylor changed the title spec: built-ins such as len to return untyped result for constant expressions (investigation) proposal: Go 2: change len, cap, unsafe.Sizeof, unsafe.OffsetOf to return untyped constants May 14, 2019

@gopherbot gopherbot added the Proposal label May 14, 2019

@ianlancetaylor ianlancetaylor changed the title proposal: Go 2: change len, cap, unsafe.Sizeof, unsafe.OffsetOf to return untyped constants proposal: Go 2: change len, cap, unsafe.Sizeof, unsafe.OffsetOf to return untyped constants if constant May 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.