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

[Feature Request] Add more List methods to the InlineList struct #2610

Open
1 task done
gabrieldemarmiesse opened this issue May 10, 2024 · 1 comment
Open
1 task done
Labels
enhancement New feature or request mojo-repo Tag all issues with this label

Comments

@gabrieldemarmiesse
Copy link
Contributor

gabrieldemarmiesse commented May 10, 2024

Review Mojo's priorities

What is your request?

The InlineList struct has been added to the stdlib recently: #2587 .
We would like to have more methods available in InlineList, and those methods should mirror the ones available in List.

We would like to avoid code duplication as much as possible, so, when adding new methods, please try to group the code together when it's relevant to do so.

What is your motivation for this change?

We'll use InlineList for SSO, so we'll likely need more methods, like resize, __getitem__(slice), pop, etc... There is no need to have multiple APIs for different sorts of list, so let's copy the API of the list. It will allow InlineList to be a somewhat drop-in replacement for List when the capacity is known at compile time (and small enough).

Any other details?

This is the kind of task where it makes sense to do one pull request per method added, and is very beginner friendly. If you're looking for an issue to do your first PR in Mojo, this one is pretty easy :)

@gabrieldemarmiesse gabrieldemarmiesse added enhancement New feature or request mojo-repo Tag all issues with this label labels May 10, 2024
Copy link
Collaborator

Makes sense. +1 for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request mojo-repo Tag all issues with this label
Projects
None yet
Development

No branches or pull requests

2 participants