<div dir="ltr"><div class="markdown-here-wrapper" style=""><p style="margin:0px 0px 1.2em!important">2016-11-08 23:43 GMT+03:00 Jose Cheyo Jimenez &lt;<a href="mailto:cheyo@masters3d.com" target="_blank">cheyo@masters3d.com</a>&gt;:</p>
<p style="margin:0px 0px 1.2em!important"></p><div class="markdown-here-exclude"><p></p><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div></div><div style="direction:inherit">Thank for thinking of this. I am not sure on the advantage of having nil as a concrete type. </div><div style="direction:inherit"><br></div><div style="direction:inherit">Have you seen this talk?</div><div style="direction:inherit"><br></div><div style="direction:inherit"><p style="margin:0px;font-size:12px;line-height:normal;font-family:helvetica"><span style="font-size:12pt"><a href="https://realm.io/news/swift-summit-al-skipp-monads/" target="_blank">https://realm.io/news/swift-<wbr>summit-al-skipp-monads/</a></span></p></div><div><div style="direction:inherit"><br></div><div style="direction:inherit"><span style="background-color:rgba(255,255,255,0)">&quot;The concept of “nil” does not exist in Swift (despite the existence of the keyword <code style="box-sizing:border-box;border-radius:4px;font-variant-ligatures:none;line-height:1.25em;overflow:auto;border:none;padding:2px 5px">nil</code>!)&quot;</span></div><div style="direction:inherit"><span style="background-color:rgba(255,255,255,0)"><br></span></div><div style="direction:inherit"><span style="background-color:rgba(255,255,255,0)">Does that talk change your mind about this pitch?</span></div></div></div></blockquote><p></p></div><p style="margin:0px 0px 1.2em!important"></p>
<p style="margin:0px 0px 1.2em!important">Not much. We can talk about Swift literals being untyped as much as we want, but still all of them, except for <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">nil</code>, have an internal storage type, which is also picked by default.<br>For example, integer literals are <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">Builtin.Int2048</code>, if I’m not mistaken. But we just can’t store <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">nil</code> without creating an instance of a potentially complex type.</p>
<p style="margin:0px 0px 1.2em!important">And this proposal is not about adding <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">nil</code> to all types. You can do this now with <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">Any</code>, in any case:</p>
<pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;margin:1.2em 0px"><code class="hljs language-swift" style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline;white-space:pre;overflow:auto;border-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block!important;display:block;overflow-x:auto;padding:0.5em;color:rgb(51,51,51);background:rgb(248,248,248)"><span class="hljs-keyword" style="color:rgb(51,51,51);font-weight:bold">let</span> optionalInt1: <span class="hljs-type" style="color:rgb(68,85,136);font-weight:bold">Any</span> = <span class="hljs-number" style="color:rgb(0,128,128)">42</span>
<span class="hljs-keyword" style="color:rgb(51,51,51);font-weight:bold">let</span> optionalInt2: <span class="hljs-type" style="color:rgb(68,85,136);font-weight:bold">Any</span> = ()   <span class="hljs-comment" style="color:rgb(153,153,136);font-style:italic">// ewww</span>
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