Closed orium closed 6 years ago
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.
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.
These can use
{Rc,Arc}::make_mut()
that can speed up things a lot if there is not a lot of structural sharing.List
Vector
Stack
Queue
HashTrieMap
HashTrieSet
RedBlackTreeMap
RedBlackTreeSet
README.md