<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><br><br>Sent from my iPad</div><div><br>On Feb 17, 2017, at 6:44 PM, Xiaodi Wu via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">On Fri, Feb 17, 2017 at 5:49 PM, Rob Mayoff via swift-evolution <span dir="ltr"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><span class=""><div class="gmail_quote">On Fri, Feb 17, 2017 at 3:56 PM, Xiaodi Wu via swift-evolution <span dir="ltr"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></span> wrote:</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="font-size:12.8px">Here, a function call is an _intentional_ act. Writing a function not meant to be called is an _intentional_ act. It is strange that you would demand the compiler to stand between two of your own intentional acts.</span></blockquote><div><br></div></span><div>Yesterday I stated one intention. Today I (or a coworker) act with a contradictory intention.</div><div><br></div><div>One of these intentions, or some underlying assumption, must be in error.</div></div></div></blockquote><div><br></div><div>Must it? Contradiction != error. I can simultaneously not want to expose a member as the vendor of the API *and* want to invoke the same member as the consumer of the API. Why must I be in error?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div>Why would I want to rely on a human to notice the error, if I can make the compiler do it?<br></div><div><br></div><div>It is normal to want the compiler to catch my errors. It is strange to prefer finding errors manually.</div></div></div></blockquote><div><br></div><div>I can agree that compilers should catch errors. I want to persuade you that what we are talking about here does not fall into the category of error.</div></div></div></div></div></blockquote><div><br></div><div>I don't view it so much as an error as I do a great tool to communicate compiler verified intent across time (to future readers and to your future self). As with many things in programming, the value of this is subjective (or at least subject of plentiful debate). I personally find it quite useful and it's clear that I am not alone. On the other hand, it's clear that many people don't find it terribly useful.</div><br><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div>You might persuade me that the cost (in language complexity) of having the compiler detect the contradiction outweighs the benefit.</div><div><br></div><div>But I doubt you can persuade me that the detection has no benefit.</div><div><br></div></div></div>
<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>
<br></blockquote></div><br></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>