<div style="white-space:pre-wrap">Could you, please, bring a code example?</div><br><div class="gmail_quote"><div dir="ltr">On Fri, 2 Dec 2016 at 19:31 Adrian Zubarev &lt;<a href="mailto:adrian.zubarev@devandartist.com">adrian.zubarev@devandartist.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="gmail_msg"><div class="m_-4644302281767839272bloop_markdown gmail_msg"><p class="gmail_msg">The problem I bumped into is, that I cannot overload a function which uses an associated type, so I could pass that instance to different type which needs the other overloaded function. Only generic protocols could do this.</p>

<p class="gmail_msg">Something similar is described as the top of the <strong class="gmail_msg">Generic protocols</strong> section in the <a href="https://github.com/apple/swift/blob/master/docs/GenericsManifesto.md#generic-protocols" class="gmail_msg" target="_blank">generics manifesto</a>.</p>

<p class="gmail_msg"></p></div><div class="m_-4644302281767839272bloop_original_html gmail_msg"></div></div><div style="word-wrap:break-word" class="gmail_msg"><div class="m_-4644302281767839272bloop_original_html gmail_msg"><div id="m_-4644302281767839272bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto" class="gmail_msg"><br class="gmail_msg"></div> <br class="gmail_msg"> <div id="m_-4644302281767839272bloop_sign_1480699617867569920" class="m_-4644302281767839272bloop_sign gmail_msg"><div style="font-family:helvetica,arial;font-size:13px" class="gmail_msg">-- <br class="gmail_msg">Adrian Zubarev<br class="gmail_msg">Sent with Airmail</div></div> <br class="gmail_msg"></div></div><div style="word-wrap:break-word" class="gmail_msg"><div class="m_-4644302281767839272bloop_original_html gmail_msg"><p class="m_-4644302281767839272airmail_on gmail_msg">Am 2. Dezember 2016 um 18:25:49, Daniel Leping (<a href="mailto:daniel@crossroadlabs.xyz" class="gmail_msg" target="_blank">daniel@crossroadlabs.xyz</a>) schrieb:</p> <blockquote type="cite" class="m_-4644302281767839272clean_bq gmail_msg"><span class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"></div><div class="gmail_msg">





<div style="white-space:pre-wrap" class="gmail_msg">Aren&#39;t protocols generic already
using associatedtype?<br class="gmail_msg">
<br class="gmail_msg">
Also, what I really would like to have is generic associatedtype.
Basically to work the very same way as typealias.<br class="gmail_msg">
<br class="gmail_msg">
Another nice to have feature might be having a possibility to add
the same generic protocol several times with different type
associated. It might be a bad C++ habit, though. Still I really
miss it sometimes :)<br class="gmail_msg">
<br class="gmail_msg">
What else is missing for me is possibility to declare a var or
return type by generic protocol. Have to create a specific class
all the time which is a big pain.</div>
<br class="gmail_msg">
<div class="gmail_quote gmail_msg">
<div dir="ltr" class="gmail_msg">On Fri, 2 Dec 2016 at 18:36 Adrian Zubarev via
swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a>&gt;
wrote:<br class="gmail_msg"></div>
<blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word" class="gmail_msg">
<div id="m_-4644302281767839272m_6504450228615953105bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto" class="gmail_msg">Hi there, I wanted to ask if we need generic
protocols in stage one or is it something for stage two? I
literally bumped into a corner where I need them to write a nice
and type safe API.</div>
<br class="gmail_msg">
<div id="m_-4644302281767839272m_6504450228615953105bloop_sign_1480696419231974144" class="m_-4644302281767839272m_6504450228615953105bloop_sign gmail_msg">
<div style="font-family:helvetica,arial;font-size:13px" class="gmail_msg">-- <br class="gmail_msg">
Adrian Zubarev<br class="gmail_msg">
Sent with Airmail</div>
</div>
</div>
_______________________________________________<br class="gmail_msg">
swift-evolution mailing list<br class="gmail_msg">
<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a><br class="gmail_msg">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="gmail_msg">
</blockquote>
</div>


</div></div></span></blockquote></div></div></blockquote></div>