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

refactor libcollections::List, add documentation #13011

Closed
wants to merge 2 commits into from

Conversation

erickt
Copy link
Contributor

@erickt erickt commented Mar 19, 2014

This PR refactors libcollections::List to remove the @ and replace it with unique pointers. I did this for two reasons. First, none of our other libcollections data structures attempt to share any data between copies. I feel we should instead investigate a separate library for persistent data structures instead of just having this one standing out on it's own.

Second, there is only one user of List, and it's libarena, and this change gets rid of an reference counted pointer in it's structure. It's minor, but it may make it a teensy bit faster.

While I was here, I added a bunch of documentation and extended the api to be a little more consistent with the rest of the sequence data structures. I also removed an old purity test that is now redundant.

@thestinger
Copy link
Contributor

If it's not a persistent list, then I don't really see a point of having it. Why not just use a vector in the arena?

@alexcrichton
Copy link
Member

This type/collection seems to have been limping along for quite some time now. It's never really sat well with me, no matter what the api we expose from it is. This may be indicative that it should just be removed.

Do we have any real world use cases of this type?

@erickt
Copy link
Contributor Author

erickt commented Mar 20, 2014

I'd be fine with us removing List. We need to figure out a good strategy for persistent data structures.

@alexcrichton
Copy link
Member

We decided in today's meeting that this type should just get removed for now.

@erickt, do you want to amend this PR? If you're running low on time, I'd be willing to take over!

@erickt
Copy link
Contributor Author

erickt commented Mar 28, 2014

Closing in favor of #13183.

@erickt erickt closed this Mar 28, 2014
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 this pull request may close these issues.

3 participants