<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 Feb 20, 2017, at 11:14 AM, Anton Zhilin &lt;<a href="mailto:antonyzhilin@gmail.com" class="">antonyzhilin@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="markdown-here-wrapper" style=""><p style="margin:0px 0px 1.2em!important" class="">2017-02-20 18:23 GMT+03:00 Matthew Johnson &lt;<a href="mailto:matthew@anandabits.com" target="_blank" class="">matthew@anandabits.com</a>&gt;:</p><div style="margin: 0px 0px 1.2em !important;" class=""><br class="webkit-block-placeholder"></div><div class="markdown-here-exclude"><div class=""><br class="webkit-block-placeholder"></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class=""><br class=""><div class=""><span class="gmail-"><blockquote type="cite" class=""><div class="">On Feb 20, 2017, at 3:58 AM, Anton Zhilin &lt;<a href="mailto:antonyzhilin@gmail.com" target="_blank" class="">antonyzhilin@gmail.com</a>&gt; wrote:</div><div class=""><div dir="ltr" class=""><div class="gmail-m_-1259088571132064262markdown-here-wrapper"><p style="margin:0px 0px 1.2em" class="">But that raises another concern. In a previous discussion, it was taken for granted that <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" class="">Never</code> should conform to all protocols</p></div></div></div></blockquote></span><div class="">Do you have a pointer to this discussion?&nbsp; I must have missed it.</div></div></div></blockquote><div class=""><br class="webkit-block-placeholder"></div></div><div style="margin: 0px 0px 1.2em !important;" class=""><br class="webkit-block-placeholder"></div><p style="margin:0px 0px 1.2em!important" class=""><a href="http://discourse.natecook.com/t/idea-change-noreturn-func-f-to-func-f-noreturn/1000" class="">Here</a> is the discussion where the idea of “empty” type originated.<br class="">Some messages on the topic ended up being <a href="http://discourse.natecook.com/t/idea-repurpose-void/1406" class="">there</a>.</p><p style="margin:0px 0px 1.2em!important" class=""><a href="http://discourse.natecook.com/t/idea-repurpose-void/1406" class="">This</a> is the earliest mention of usage of this empty type 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" class="">rethrows</code> I could find.<br class="">Some related messages are <a href="http://discourse.natecook.com/t/draft-change-noreturn-to-unconstructible-return-type/1765/16" class="">here</a> as well.</p><div class=""><br class=""></div></div></div></div></blockquote><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="markdown-here-wrapper" style=""><p style="margin:0px 0px 1.2em!important" class="">We called this type <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" class="">NoReturn</code> and meant it to be the <em class="">bottom type</em>, i.e. subtype of all types, meaning that if you have an instance of <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" class="">NoReturn</code>—which can only happen in unreachable sections of code—then you can convert it to any type. It should have worked like this:</p>
<pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;margin:1.2em 0px" class=""><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;white-space:pre;overflow:auto;border-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block!important" class="">func fatalError() -&gt; Never

func divide(a: Int, b: Int) -&gt; Int {
    if b == 0 {
        let n: Never = fatalError()
        return n as Int
    }
    return a / b
}
</code></pre><p style="margin:0px 0px 1.2em!important" class="">I pushed the idea of replacing <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" class="">rethrows</code> 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" class="">Never</code>, inspired by Haskell. Although Haskell doesn’t have static function requirements and initializer requirements.</p><div class=""><br class=""></div></div></div></div></blockquote><div><br class=""></div><div>Thanks for the links. &nbsp;I scanned through them somewhat quickly and didn’t see anything that specifically said `Never` should conform to all protocols. &nbsp;Did you see that specifically? &nbsp;I only saw mentions of it being a bottom type and therefore a subtype of all types, which I think is a bit different.</div><div><br class=""></div><div>I think a big part of the confusion here revolves around the distinction between a type `T` being a subtype of another type `U` and `Type&lt;T&gt;` being a subtype of `Type&lt;U&gt;` (using the syntax in your metatype refactoring proposal). &nbsp;I’m not an expert in this area, but I suspect that `Never` can be a subtype of all existential types but without requiring it to actually *conform* to all protocols. &nbsp;Any non-instance protocol requirements are not available on existentials (afaik).</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="markdown-here-wrapper" style=""><div style="margin: 0px 0px 1.2em !important;" class=""><br class="webkit-block-placeholder"></div><div class="markdown-here-exclude"><div class=""><br class="webkit-block-placeholder"></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class=""><div class=""><span class="gmail-"><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail-m_-1259088571132064262markdown-here-wrapper"><p style="margin:0px 0px 1.2em" class="">, because if one obtains an instance of <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" class="">Never</code> (and they won’t), then everything is possible. But now we say that <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" class="">Never</code> can’t conform to <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" class="">Default</code>, because this would break its very invariant. Also it can’t conform to any protocol with static members or initializers.</p></div></div></div></blockquote></span><div class="">It seems highly problematic to me to say that never conforms to any protocol with non-instance requirements.</div></div></div></blockquote><div class=""><br class="webkit-block-placeholder"></div></div><div style="margin: 0px 0px 1.2em !important;" class=""><br class="webkit-block-placeholder"></div><p style="margin:0px 0px 1.2em!important" class="">Here is an example with instance requirements only:</p>
<pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;margin:1.2em 0px" class=""><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;white-space:pre;overflow:auto;border-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block!important" class="">protocol MakesPizza {
    func cook() -&gt; Pizza
}
extension Never : MakesPizza {
    func cook() -&gt; Pizza {
        // this method will never be called anyway
        burnThisComputer()
    }
}

let maestroLaPizza = isHeAtWork ? validMaestro : (fatalError("something went wrong") as MakesPizza)
maestroLaPizza.cook()
</code></pre><p style="margin:0px 0px 1.2em!important" class="">In this way, <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" class="">Never</code> can conform to any protocol with only instance requirements.</p></div></div></div></blockquote><div>Sure.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="markdown-here-wrapper" style=""><div style="margin: 0px 0px 1.2em !important;" class=""><br class="webkit-block-placeholder"></div><div class="markdown-here-exclude"><div class=""><br class="webkit-block-placeholder"></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class=""><div class=""><span class="gmail-"><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail-m_-1259088571132064262markdown-here-wrapper"><p style="margin:0px 0px 1.2em" class="">But then basically, <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" class="">Never</code> trick can’t be used when we request anything more than <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" class="">Error</code> from generic error type (with static members or initializers). So this approach turns out to be more limiting than <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" class="">rethrows</code>.<br class=""></p></div></div></div></blockquote></span><div class="">Can you elaborate here?&nbsp; If you require a function to throw an error type that has non-instance requirements then you would necessarily be restricting callers to provide a throwing function.&nbsp; It is not possible to express such a function with `rethrows`.&nbsp; You can’t talk about the error type at all.&nbsp; If you could talk about the error type and were able to constrain it in this way `rethrows` would necessarily have to exhibit the same behavior as the generic version.&nbsp; The behavior arises out of the constraint you are applying, not the mechanism by which you forward the type.</div></div></div></blockquote><div class=""><br class="webkit-block-placeholder"></div></div><div style="margin: 0px 0px 1.2em !important;" class=""><br class="webkit-block-placeholder"></div><p style="margin:0px 0px 1.2em!important" class="">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" class="">rethrows</code> approach:</p>
<pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;margin:1.2em 0px" class=""><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;white-space:pre;overflow:auto;border-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block!important" class="">protocol BaseError : Error {
    init()
}

func seq&lt;E1, E2&gt;(f: () throws(E1) -&gt; (), g: () throws(E2) -&gt; ()) rethrows(BaseError)
     where E1: BaseError, E2: BaseError { ... }
</code></pre><p style="margin:0px 0px 1.2em!important" class="">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" class="">Never</code> approach, we have to create two separate functions for the same effect, because <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" class="">Never</code> does not fit in <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" class="">BaseError</code>:</p>
<pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;margin:1.2em 0px" class=""><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;white-space:pre;overflow:auto;border-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block!important" class="">func seq&lt;E1, E2&gt;(f: () throws(E1) -&gt; (), g: () throws(E2) -&gt; ()) throws(BaseError)
     where E1: BaseError, E2: BaseError {
    // It never actually throws E1() or E2() itself, but this fact can't be reflected in the signature
}

func seq(f: () -&gt; (), g: () -&gt; ()) {
    // repeat the body
}
</code></pre><p style="margin:0px 0px 1.2em!important" class="">That’s where loss of information (which I meantioned earlier) hurts: we can’t apply magic and say “if <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" class="">E1</code> and <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" class="">E2</code> 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" class="">Never</code> then <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" class="">seq</code> does not throw. Because it <strong class="">can</strong> throw anyway.</p><p style="margin:0px 0px 1.2em!important" class="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
</div></blockquote></div><br class=""><div class="">Yes, I understood the example and it’s a good one. &nbsp;What I’m wondering is what benefit you actually get from this. &nbsp;There are two places where this default initializer could be used:</div><div class=""><br class=""></div><div class="">1. In `seq` itself. &nbsp;But it seems highly dubious to throw an error you know nothing about. &nbsp;Why does `seq` need the ability to construct an error of the same type as a function given to it without knowing anything more about that error type. &nbsp;Is there a use case for this?</div><div class="">2. In callers of `seq`. &nbsp;Why would the caller care if the error type that `seq` can throw has a default initializer? &nbsp;Is there a use case for this?</div><div class=""><br class=""></div><div class="">In other words, why do you want to specify that the type of error that might be thrown must have a default initializer? &nbsp;I can’t think of any possible circumstance where this would be valuable.</div><div class=""><br class=""></div><div class="">The same question can be asked of any other static requirements. &nbsp;What are the use cases? &nbsp;These seem highly theoretical to me. &nbsp;Maybe I’m missing something, but if so I would like to see an example of how it is *used*, not just how you would need to write an extra overload without `rethrows`.</div><div class=""><br class=""></div><div class="">There is a potentially more practical benefit of keeping rethrows. &nbsp;If a function is declared with `rethrows` we know that the function itself does not throw. &nbsp;It only throws if one of its arguments throw when it invokes them. &nbsp;This is a subtle but important difference. &nbsp;For example, users calling a rethrowing function know that *they* have control over whether or not the call *actually* throws. &nbsp;The caller might pass a couple of functions that *can* throw but in this particular case are known not to throw. &nbsp;That could influence how the caller handles errors in the surrounding scope.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div></body></html>