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

Integer key types for Map #48

Open
1 task
uint opened this issue Jun 25, 2024 · 2 comments · May be fixed by #51
Open
1 task

Integer key types for Map #48

uint opened this issue Jun 25, 2024 · 2 comments · May be fixed by #51

Comments

@uint
Copy link
Collaborator

uint commented Jun 25, 2024

Also update user docs with storey examples:

@uint
Copy link
Collaborator Author

uint commented Jul 3, 2024

So this got me thinking about bounded iteration. A redesign of map keys might be in order so that we distinguish between dynamically and statically sized keys (u32 is statically sized, String is dynamically sized).

This is important since length-prefixing messes with the order of iteration, but no length-prefixing means bounded iteration will work pretty intuitively. I'd like to enable bounded iteration, but only in situations when it's not surprising (e.g. when using statically sized keys).

I also need to move length-prefixing logic from Map to the key itself, so that stuff like u32 can opt out.

tl;dr a bit of a rabbit hole here, I want to make sure we're nudging the design in the right direction when we do this

@uint
Copy link
Collaborator Author

uint commented Jul 4, 2024

@uint uint linked a pull request Jul 9, 2024 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant