<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 Dec 19, 2015, at 12:17 PM, Michael Henson via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><blockquote class="gmail_quote" style="font-size:12.8px;margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">1) Do you agree about using “associatedtype”?<br class="">2) If not, which keyword would you prefer to use? why? (you can introduce a new one)</blockquote><div style="font-size:12.8px" class=""><br class="">There is another alternative. Rather than trying to come up with another brand-new keyword, we can re-use one that has an existing and appropriate meaning: required.<br class=""><br class="">Example:<br class=""><br class="">protocol ExampleProtocol {</div><div style="font-size:12.8px" class=""> required typealias Element</div><div style="font-size:12.8px" class=""> typealias MethodSignature = (arg: Element) -> Bool<br class=""><br class=""></div><div style="font-size:12.8px" class=""> ... etc</div><div style="font-size:12.8px" class="">}<br class=""></div><div style="font-size:12.8px" class=""><br class=""></div><div style="font-size:12.8px" class="">It's a little more verbose at the point of use but the declarations are relatively uncommon and this usage is clearly separate from regular typealias declarations.<br class=""></div></div></div></blockquote></div><div class=""><br class=""></div><div class="">I think this is a big improvement over associatedtype, except that the type that satisfies the requirement needn't be a typealias. I would therefore prefer "requiredtype."</div><div class=""><br class=""></div><div class="">
-Dave<div class=""><br class=""></div><br class="Apple-interchange-newline">
</div>
<br class=""></body></html>