This means it’s a perfect chance to duscuss what more should be added to prelude! Here’s my proposals from my own practice.
1. std itself
std is the single most use case of absolute path syntax like ::std::vec::Iter. And who want to use this name for another thing?
2. Default::default
Default is nice, mostly because they’re #[derive()]able. But Default::default() is sometimes too verbose, and default() is clear enough to inform to construct some default value.
3. std::cmp::{min, max}
These are useful for simple example code to introduce rust language to newcommers, and they have crystal clear names.
Please comment if you like/dislike some proposals above, or have another proposal like them.
Probably not Default::default(). The name default is so generic, it is likely to clash with something else in existing code, which is probably not a Good Thing™. (At best, it would fail to compile; at worst, it would compile and silently do the wrong thing because of the level of lenience Rust provides when it comes to shadowing.)
The second example in itself is already bad enough. In addition, default() out of context totally just looks like an arbitrary free function, especially when type inference is involved (which it usually is when using default). It’s very good to have the visual clue of e.g. Default::default() or even an explicit Type::default() when reading default-using code.
IMO, Default::default() is completely wasteful stutter. Type::default(), however, should probably be the preferred style in the vast majority of cases.
Given that Type::default() is what you should be writing, it doesn’t make much sense to put Default::default into the prelude. You should specify what type you’re trying to produce the default of.
also, when I write code with a lot of similar but different collection types because I want to experiment with each kind of collection, I’d rather not change each occurrence of an empty collection constructor if I want to switch types. I strongly prefer to just write Default::default() wherever an empty container is needed. A similar argument also applies when you use macros to e.g. mass-implement a trait for several similar but different types.