Skip to content

Commit

Permalink
Add a bit about a prelude::v1 module
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Dec 16, 2014
1 parent 2ac10c8 commit 30bb0f0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions text/0000-prelude-stabilization.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,24 @@ pub use comm::{SyncSender, Sender, Receiver};
pub use task::spawn;
```

## Move to an inner `v1` module

This RFC also proposes moving all reexports to `std::prelude::v1` module instead
of just inside `std::prelude`. The compiler will then start injecting `use
std::prelude::v1::*`.

This is a pre-emptive move to help provide room to grow the prelude module over
time. It is unlikely that any reexports could ever be added to the prelude
backwards-compatibly, so newer preludes (which may happen over time) will have
to live in new modules. If the standard library grows multiple preludes over
time, then it is expected for crates to be able to specify which prelude they
would like to be compiled with. This feature is left as an open question,
however, and movement to an inner `v1` module is simply preparation for this
possible move happening in the future.

The versioning scheme for the prelude over time (if it happens) is also left as
an open question by this RFC.

# Drawbacks

A fairly large amount of functionality was removed from the prelude in order to
Expand Down

0 comments on commit 30bb0f0

Please sign in to comment.