# Synthesizing default values for the memberwise initializer

**URL:** <https://forums.swift.org/t/synthesizing-default-values-for-the-memberwise-initializer/17227>\
**Category:** Pitches\
**Created:** [October 21, 2018, 9:16pm UTC](https://forums.swift.org/t/synthesizing-default-values-for-the-memberwise-initializer/17227 "2018-10-21T21:16:18Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![anandabits](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/anandabits/32/355_2.png) [@anandabits](https://forums.swift.org/u/anandabits)\
**Post date:** [October 22, 2018, 2:28pm UTC](https://forums.swift.org/t/synthesizing-default-values-for-the-memberwise-initializer/17227/12 "2018-10-22T14:28:32Z")

</div>

> [@Alejandro](#):
>
> No. With the way constants are handled, we cannot alter their storage if they already have a pattern binding.

This is true of the current model, although the core team was receptive to the idea of changing this in their feedback to SE-0018. If it were changed, the model would be "immutable after initialization". Assignment in the declaration would be treated as a default initialization that is not used if an initializer provides a _different_ value for the constant.

I understand that you want to keep this proposal simple so I think it's ok to leave that enhancement off for now, but supporting this is a viable future direction.

As the author of SE-0018, I would really like to revisit the topic in a more comprehensive manner someday, but I think this is a good intermediate step that would not conflict with any direction we might eventually take. It fills an obvious gap in the current initializer synthesis and should be straightforward to implement.

---

_[View the full topic](https://forums.swift.org/t/synthesizing-default-values-for-the-memberwise-initializer/17227)._
