<div dir="ltr">hot take: i use the second one a lot but only because i always forget the first one exists. So I type the <span style="font-family:monospace,monospace">= nil</span> just to “be sure”.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 6, 2017 at 4:33 PM, Slava Pestov via swift-evolution <span dir="ltr"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
Right now, the following two declarations are equivalent:<br>
<br>
struct S {<br>
var x: Int?<br>
}<br>
<br>
struct S {<br>
var x: Int? = nil<br>
}<br>
<br>
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.<br>
<br>
Slava<br>
______________________________<wbr>_________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-<wbr>evolution</a><br>
</blockquote></div><br></div>