# PrePitch: Optional variables should require explicit initialization

**URL:** <https://forums.swift.org/t/prepitch-optional-variables-should-require-explicit-initialization/26077>\
**Category:** Pitches\
**Created:** [June 19, 2019, 8:59pm UTC](https://forums.swift.org/t/prepitch-optional-variables-should-require-explicit-initialization/26077 "2019-06-19T20:59:26Z")\
**Posts on this page:** 1\
**Showing post:** 58

<div class="post-metadata">

**Author:** ![masters3d](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@masters3d](https://forums.swift.org/u/masters3d)\
**Post date:** [June 22, 2019, 3:20pm UTC](https://forums.swift.org/t/prepitch-optional-variables-should-require-explicit-initialization/26077/58 "2019-06-22T15:20:12Z")

</div>

I missed this other one too.

> [@Pitch: Remove default initialization of optional bindings](https://forums.swift.org/t/pitch-remove-default-initialization-of-optional-bindings/6961):
>
> Hi all, Right now, the following two declarations are equivalent: struct S { &nbsp;&nbsp;var x: Int? } struct S { &nbsp;&nbsp;var x: Int? = nil } That is, mutable bindings of sugared optional type (but not Optional\<T\>!) always have a default value of ‘nil’. This feature increases the surface area of the language for no good reason, and I would like to deprecate it in -swift-version 5 with a short proposal. Does anyone feel strongly about giving it up? I suspect most Swift users don’t even know it exists. S…

I’m leaning towards proposing something along the lines of default initialization via property wrappers.

```swift
@Default var foo:String // initialized to “”
@Default var foo2: String? // initialized to .some(String())

```

---

_[View the full topic](https://forums.swift.org/t/prepitch-optional-variables-should-require-explicit-initialization/26077)._
