<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Nov 6, 2017, at 4:29 PM, Kelvin Ma &lt;<a href="mailto:kelvin13ma@gmail.com" class="">kelvin13ma@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">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" class="">= nil</span> just to “be sure”.<br class=""></div></div></blockquote><div><br class=""></div>Yeah, that’s one of my arguments against having the feature, along with the simple fact that if the language did not have it already, nobody would be requesting this to be added as a special case for optionals.</div><div><br class=""></div><div>However, since I also want to avoid needless source compatibility churn, I’m fine with keeping the feature — it’s not a huge burden to maintain (unlike, say, AnyObject dispatch :) )</div><div><br class=""></div><div>Slava</div><div><br class=""><blockquote type="cite" class=""><div class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Mon, Nov 6, 2017 at 4:33 PM, Slava Pestov via swift-evolution <span dir="ltr" class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>&gt;</span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br class="">
<br class="">
Right now, the following two declarations are equivalent:<br class="">
<br class="">
struct S {<br class="">
&nbsp; var x: Int?<br class="">
}<br class="">
<br class="">
struct S {<br class="">
&nbsp; var x: Int? = nil<br class="">
}<br class="">
<br class="">
That is, mutable bindings of sugared optional type (but not Optional&lt;T&gt;!) 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 class="">
<br class="">
Slava<br class="">
______________________________<wbr class="">_________________<br class="">
swift-evolution mailing list<br class="">
<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank" class="">https://lists.swift.org/<wbr class="">mailman/listinfo/swift-<wbr class="">evolution</a><br class="">
</blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></body></html>