-
-
Notifications
You must be signed in to change notification settings - Fork 15k
Consider reverting the merge of collections into alloc #43112
Copy link
Copy link
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.P-highHigh priorityHigh priorityT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.In the final comment period and will be merged soon unless new substantive objections are raised.
Milestone
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.P-highHigh priorityHigh priorityT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.In the final comment period and will be merged soon unless new substantive objections are raised.
Type
Fields
Give feedbackNo fields configured for issues without a type.
This PR merges the collections crate into the alloc crate, with the intent of enabling this PR.
Here are some reasons against the merge:
It is a violation of layering / seperation of responsibilities. There is no conceptual reason for collections and allocation to be in the same crate. It seems to have been done to solve a language limitation, for the enablement of a fairly marginal feature. The tradeoff does not seem worth it to me.
It forces any no_std projects that want allocation to also take collections with it. There are presumably use cases for wanting allocator support without the Rust collections design (we know the collections are insufficient for some use cases).
It gives the std collections crate special capabilities that other collections may not implement themselves - no other collections will be able to achieve feature parity with the conversion this merger is meant to enable.
Personally I value the decomposition of the standard library into individual reusable components and think the merge is moving in the wrong direction.
I am curious to know what embedded and os developers think of this merge cc @japaric @jackpot51 .