# Pre-pre-RFC: syntactic sugar for \`Default::default()\`

**URL:** <https://internals.rust-lang.org/t/pre-pre-rfc-syntactic-sugar-for-default-default/13234>\
**Category:** language design\
**Created:** [October 19, 2020, 11:08pm UTC](https://internals.rust-lang.org/t/pre-pre-rfc-syntactic-sugar-for-default-default/13234 "2020-10-19T23:08:16Z")\
**Posts on this page:** 1\
**Showing post:** 75

<div class="post-metadata">

**Author:** ![ekuber](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/ekuber/32/1646_2.png) [@ekuber](https://internals.rust-lang.org/u/ekuber)\
**Post date:** [December 3, 2020, 5:19pm UTC](https://internals.rust-lang.org/t/pre-pre-rfc-syntactic-sugar-for-default-default/13234/75 "2020-12-03T17:19:36Z")

</div>

Thanks @spacekookie!

I know is a long thread so it is a good time to summarize what the RFC I'll be writing will propose, particularly because it is removed from what I originally wrote:

- Language support for default values on `struct`s through `const` expressions:

- Language support for partially defaulted `struct`s:

- Teach `#[derive(Default)]` to use the default values

- Expand the "spread" `..` operator to make the RHS expression optional, if it is not present it will use the default `const` expressions set in the `struct` definition:

- Considerations around letting non-const expressions in the `struct` default are to be punted initially

- Considerations around making partial defaults a user definable feature are to be left for a future RFC (explicitly _not_ adding a new `PartialDefault` trait, _at least_ for now)

- Further conversation around "should a struct that has all default values set automagically impl `Default`?" and "should a struct that impls `Default` automagically work with `..`?" is needed

- `fn default<T: Default>(t: T) -> T { T::default() }` is tangential and independent of this RFC

- I will be basing the RFC on prior work that has been closed in the past due to lack of bandwidth.

Please everyone, let me know if there's any item that I have forgotten in this quick summary.

---

_[View the full topic](https://internals.rust-lang.org/t/pre-pre-rfc-syntactic-sugar-for-default-default/13234)._
