<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Nov 6, 2017, at 5:29 PM, Kelvin Ma via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> 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 class="gmail_extra"><br class=""></div></div></blockquote><div><br class=""></div>Same here! I just changed a bunch of code since I’d forgotten they were the same</div><div><br class=""><blockquote type="cite" class=""><div class=""><div class="gmail_extra"><div class="gmail_quote">On Mon, Nov 6, 2017 at 4:33 PM, Slava Pestov via swift-evolution <span dir="ltr" class=""><<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>></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="">
var x: Int?<br class="">
}<br class="">
<br class="">
struct S {<br class="">
var x: Int? = nil<br class="">
}<br class="">
<br class="">
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 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>
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></body></html>