<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>-1. &nbsp;This type is isomorphic to () from a language-internal perspective and will introduce an extra name for which no useful algorithms can be written against from an external one - which makes the <i>proposal </i>isomorphic to one that introduces a keyword without significant justification.</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">~Robert Widmann</div><div><br>2016/11/08 16:07、Anton Zhilin via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; のメッセージ:<br><br></div><blockquote type="cite"><div><div dir="ltr"><div class="markdown-here-wrapper" style=""><p style="margin:0px 0px 1.2em!important">2016-11-08 23:53 GMT+03:00 Pyry Jahkola &lt;<a href="mailto:pyry.jahkola@iki.fi" target="_blank">pyry.jahkola@iki.fi</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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>Then why not just:<br></div><div><br></div><div>&nbsp; &nbsp; public protocol ExpressibleByIntLiteral {</div><div>&nbsp; &nbsp; &nbsp; static var `nil`: Self</div><div>&nbsp; &nbsp; }</div><div><br></div><div>…such that Foo.nil creates your nil value of type Foo?</div></div></blockquote><p></p></div><p style="margin:0px 0px 1.2em!important"></p>
<p style="margin:0px 0px 1.2em!important">This proposal is not about creating an alternate syntax 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 as Optional&lt;Foo&gt;</code>. It’s about granting <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> literal its own type:</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> a = <span class="hljs-built_in" style="color:rgb(0,134,179)">nil</span>
<span class="hljs-built_in" style="color:rgb(0,134,179)">print</span>(type(of: a))  <span class="hljs-comment" style="color:rgb(153,153,136);font-style:italic">//=&gt; Nil</span>
</code></pre>
<div title="MDH:PGRpdiBjbGFzcz0iZ21haWxfZXh0cmEiPjxkaXYgY2xhc3M9ImdtYWlsX3F1b3RlIj4yMDE2LTEx
LTA4IDIzOjUzIEdNVCswMzowMCBQeXJ5IEphaGtvbGEgPHNwYW4gZGlyPSJsdHIiPiZsdDs8YSBo
cmVmPSJtYWlsdG86cHlyeS5qYWhrb2xhQGlraS5maSIgdGFyZ2V0PSJfYmxhbmsiPnB5cnkuamFo
a29sYUBpa2kuZmk8L2E+Jmd0Ozwvc3Bhbj46PGJyPjxibG9ja3F1b3RlIGNsYXNzPSJnbWFpbF9x
dW90ZSIgc3R5bGU9Im1hcmdpbjowIDAgMCAuOGV4O2JvcmRlci1sZWZ0OjFweCAjY2NjIHNvbGlk
O3BhZGRpbmctbGVmdDoxZXgiPjxkaXYgZGlyPSJhdXRvIj48ZGl2PlRoZW4gd2h5IG5vdCBqdXN0
Ojxicj48L2Rpdj48ZGl2Pjxicj48L2Rpdj48ZGl2PiZuYnNwOyAmbmJzcDsgcHVibGljIHByb3Rv
Y29sIEV4cHJlc3NpYmxlQnlJbnRMaXRlcmFsIHs8L2Rpdj48ZGl2PiZuYnNwOyAmbmJzcDsgJm5i
c3A7IHN0YXRpYyB2YXIgYG5pbGA6IFNlbGY8L2Rpdj48ZGl2PiZuYnNwOyAmbmJzcDsgfTwvZGl2
PjxkaXY+PGJyPjwvZGl2PjxkaXY+4oCmc3VjaCB0aGF0IEZvby5uaWwgY3JlYXRlcyB5b3VyIG5p
bCB2YWx1ZSBvZiB0eXBlIEZvbz88L2Rpdj48L2Rpdj48L2Jsb2NrcXVvdGU+PC9kaXY+PGJyPjwv
ZGl2PjxkaXYgY2xhc3M9ImdtYWlsX2V4dHJhIj5UaGlzIHByb3Bvc2FsIGlzIG5vdCBhYm91dCBj
cmVhdGluZyBhbiBhbHRlcm5hdGUgc3ludGF4IGZvciBgbmlsIGFzIE9wdGlvbmFsJmx0O0ZvbyZn
dDtgLiBJdCdzIGFib3V0IGdyYW50aW5nIGBuaWxgIGxpdGVyYWwgaXRzIG93biB0eXBlOjwvZGl2
PjxkaXYgY2xhc3M9ImdtYWlsX2V4dHJhIj48YnI+PC9kaXY+PGRpdiBjbGFzcz0iZ21haWxfZXh0
cmEiPmBgYHN3aWZ0PC9kaXY+PGRpdiBjbGFzcz0iZ21haWxfZXh0cmEiPmxldCBhID0gbmlsPC9k
aXY+PGRpdiBjbGFzcz0iZ21haWxfZXh0cmEiPnByaW50KHR5cGUob2Y6IGEpKSAmbmJzcDsvLz0m
Z3Q7IE5pbDwvZGl2PjxkaXYgY2xhc3M9ImdtYWlsX2V4dHJhIj5gYGA8L2Rpdj4=" style="height:0;width:0;max-height:0;max-width:0;overflow:hidden;font-size:0em;padding:0;margin:0">​</div></div></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>swift-evolution mailing list</span><br><span><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br></div></blockquote></body></html>