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

Mutable methods for all data structures #14

Closed
30 tasks done
orium opened this issue Mar 30, 2018 · 2 comments
Closed
30 tasks done

Mutable methods for all data structures #14

orium opened this issue Mar 30, 2018 · 2 comments

Comments

@orium
Copy link
Owner

orium commented Mar 30, 2018

These can use {Rc,Arc}::make_mut() that can speed up things a lot if there is not a lot of structural sharing.

  • List
    • impl
    • utests
    • bench
  • Vector
    • impl
    • utests
    • bench
  • Stack
    • impl
    • utests
  • Queue
    • impl
    • utests
  • HashTrieMap
    • impl
    • utests
    • bench
  • HashTrieSet
    • impl
    • utests
  • RedBlackTreeMap
    • impl
    • utests
    • bench
  • RedBlackTreeSet
    • impl
    • utests
  • Run clippy
  • Update README.md
@Marwes
Copy link
Contributor

Marwes commented Apr 1, 2018

2c

I am not convinced about the split into mut/non-mut structures. Keeping all the methods on a single structure is both simpler to implement and easier to use. The only pro I can see for keeping it separate is that it makes it more explicit when mutating is done, however since Rust already forces the user to be explicit about mutating that is already encoded at the call site.

@orium
Copy link
Owner Author

orium commented Apr 1, 2018

My main motivation for the separation is conceptual (having neat API, separation of two different paradigms). But I have to say that the maintenance burden of doing this separation starts to outweight the conceptual neatness I was looking for. I will follow your suggestion and not split them.

@orium orium changed the title Mutable implementations of the data structures Mutable methods for all data structures Apr 1, 2018
@orium orium self-assigned this Apr 8, 2018
@orium orium removed the mutable label Apr 8, 2018
@orium orium closed this as completed in d44e715 Apr 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants