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

[Draft] Migrate to 64-bit index and length #77

Open
Glavo opened this issue Jan 5, 2025 · 1 comment
Open

[Draft] Migrate to 64-bit index and length #77

Glavo opened this issue Jan 5, 2025 · 1 comment
Assignees
Labels

Comments

@Glavo
Copy link
Owner

Glavo commented Jan 5, 2025

Currently Traversable and all collection APIs use int for indexes and lengths, so the behavior of these collections when the number of elements exceeds 2147483647 is undefined.

We can’t be constrained by this forever. Since the Foreign Memory API has been delivered, we can easily manage large memory segments exceeding the Integer.MAX_VALUE limit. I think it's time to move away from int and towards long.

Making this change would require modifying a lot of APIs, so we're not in a rush to do it. Here are some of the APIs that will be affected:

  • AnyTraversable and its subtypes (include all collections);
  • All functional interfaces with indexes (such as IndexedFunction).

I would like to know users' opinions and suggestions on this. (call @ice1000)

@Glavo Glavo added the draft label Jan 5, 2025
@ice1000
Copy link

ice1000 commented Jan 5, 2025

I think 64 bit makes sense. I'm not going to object it

@Glavo Glavo self-assigned this Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants