<div dir="ltr"><a href="https://docs.docker.com/toolbox/toolbox_install_mac/">https://docs.docker.com/toolbox/toolbox_install_mac/</a><br></div><div class="gmail_extra"><br><div class="gmail_quote">On 23 October 2016 at 06:56, T.J. Usiyan via swift-evolution <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks for the heads up! It wasn&#39;t just meant for you. Use of a generic Result type is one of my motivating cases. <div><br></div><div>1. If multiple libraries declare a generic type like that, converting between them becomes a pain. </div><div>2. Specific result types are useful and appropriate in many, if not most, cases.</div><div>3. protocols and retroactive conformance could make this less challenging</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Oct 22, 2016 at 3:42 PM, David Sweeris <span dir="ltr">&lt;<a href="mailto:davesweeris@mac.com" target="_blank">davesweeris@mac.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Was not sending your reply only to me and not the list intentional? It’s fine either way, I was just about to send this to the list when I realized you’d only sent your reply to me, and I don’t want quote you somewhere if you intentionally didn’t post there.<div><span><br><div><blockquote type="cite"><div>On Oct 22, 2016, at 1:39 PM, T.J. Usiyan &lt;<a href="mailto:griotspeak@gmail.com" target="_blank">griotspeak@gmail.com</a>&gt; wrote:</div><br class="m_-8124897521464561145m_-820042421843089175Apple-interchange-newline"><div><div dir="ltr"><div>I would actually hope otherwise. A real benefit of enums is compile time guarantees. I am looking for a generic means to represent and handle a set of possible outcomes. Not in the hopes of making everything fully generic but lessening the redundant parts of dealing with, for example, Result types.<br></div></div></div></blockquote></div><br></span><div>I think you can do that now...</div><div><font face="FiraMono-Regular">enum </font><span style="font-family:FiraMono-Regular">Result&lt;Payload&gt;</span><font face="FiraMono-Regular"> {</font></div><div><div><span style="font-family:FiraMono-Regular">    case success(Payload)</span></div><div><font face="FiraMono-Regular">    case failure(Error)</font></div><div><span style="font-family:FiraMono-Regular">}</span></div></div><div><br></div><div>Then in your function…</div><div><font face="FiraMono-Regular">func foo&lt;T&gt; (r: Result&lt;T&gt;) {</font></div><div><font face="FiraMono-Regular">    ...</font></div><div><font face="FiraMono-Regular">    switch r {</font></div><div><font face="FiraMono-Regular">    case .success(let p): ...</font></div><div><font face="FiraMono-Regular">    case .failure(let e): ...</font></div><div><font face="FiraMono-Regular">    }</font></div><div><span style="font-family:FiraMono-Regular">    ...</span></div><div><font face="FiraMono-Regular">}</font></div><div><br></div><div>Or am I just not understanding you?</div><div><br></div><div>- Dave Sweeris</div></div></div></blockquote></div><br></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><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div><img src="http://dubdubdubdude.com/images/email_sig.gif"></div></div>
</div>