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

standard library: array len and other properties are int instead of usize or isize #23614

Open
Xyndra opened this issue Jan 30, 2025 · 2 comments
Labels
Feature/Enhancement Request This issue is made to request a feature or an enhancement to an existing one.

Comments

@Xyndra
Copy link

Xyndra commented Jan 30, 2025

As you should know, the entire point of the usize and isize types is pointer size. Arrays can have a longer length than int if they are on 64 bit, which is the stronger standard. Please change this. Even one of the comments hint at this being a wanted feature that was forgotten.

Image

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

Copy link

Connected to Huly®: V_0.6-22039

@JalonSolov
Copy link
Contributor

int will be changing in V, so that it will match int in Go, which is basically isize - 32 bits on 32-bit CPUs, and 64 bits on 64-bit CPUs.

If you want a specific size after that, you will need to use i32, etc.

@felipensp felipensp added the Feature/Enhancement Request This issue is made to request a feature or an enhancement to an existing one. label Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature/Enhancement Request This issue is made to request a feature or an enhancement to an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants