In Rust, it is possible to add a default value implementation to a type via the Default trait, and if the default value is bound to a variable, we can do this with the following code:
let value = i32::default();
or Option
let value = Option::<i32>::default();
We can make it more convenient to explicitly declare variables and bind default values by adding a default keyword:
I'm hoping that we can achieve something very similar to this: we can use Default::default; in the prelude, and then write:
let value: SomeType = default();
The value isn't extremely clear in that case, since that isn't much shorter than let value = SomeType::default();, but the value becomes clearer when writing:
There is no breaking change involved, the feature of being able to use associated functions of traits uses syntax that is always a compile error today and adding a new function to the prelude is non-breaking.
(On the other hand making default a keyword is a breaking change and will result in having to use Default::r#default() when calling the method).
Frankly I think making default a keyword would be a rather bad idea even if we were starting with a clean sheet, and fiddling with syntax between editions is even worse.