<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="">How about mutating keyword just like func's:<div class=""><br class=""></div><div class="">mutating protocol&nbsp;Foo&nbsp;{…}</div><div class=""><br class=""></div><div class="">Isn’t that what the current “class” keyword is trying to indicate? It feels awkward that a protocol would inherit from a reference type when just looking at the syntax, whether it be class, AnyObject, etc.</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On May 5, 2016, at 10:52 AM, Jesse Squires via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">&gt;&nbsp;<span style="font-size:13px" class="">Personally I have always felt “</span><span class="" style="font-size:13px">class</span><span style="font-size:13px" class="">” was an oddball special case here</span><br style="font-size:13px" class=""><span style="font-size:13px" class="">that's unneeded because&nbsp;</span><span class="" style="font-size:13px">we</span><span style="font-size:13px" class="">&nbsp;have a perfectly good protocol that means the</span><br style="font-size:13px" class=""><span style="font-size:13px" class="">same thing: AnyObject.</span><div class=""><span style="font-size:13px" class=""><br class=""></span></div><div class=""><span style="font-size:13px" class="">+1&nbsp;</span></div><div class=""><span style="font-size:13px" class=""><br class=""></span></div><div class=""><span style="font-size:13px" class="">Repurposing the `class` keyword to constrain a protocol to reference types has always felt awkward, out-of-place, and inconsistent with the rest of the language. I would love to see this changed to `AnyObject` as Dave suggests.</span></div><div class=""><span style="font-size:13px" class=""><br class=""></span></div><div class=""><span style="font-size:13px" class="">Given all of the other great refinements for language consistency that have been proposed and accepted for Swift 3, the awkwardness of using `class` here is even greater than before.</span></div><div class=""><span style="font-size:13px" class=""><br class=""></span></div><div class=""><span style="font-size:13px" class="">Jesse</span></div><div class=""><span style="font-size:13px" class=""><br class=""></span></div><div class=""><span style="font-size:13px" class=""><br class=""></span></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Tue, May 3, 2016 at 11:06 AM, Dave Abrahams via swift-evolution <span dir="ltr" class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>&gt;</span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br class="">
on Mon May 02 2016, David Sweeris &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class="">
<br class="">
&gt; I was just thinking that:<br class="">
&gt;<br class="">
&gt;&nbsp; &nbsp; &nbsp;protocol Foo : reference {}<br class="">
&gt;<br class="">
&gt; might be more to the point than:<br class="">
&gt;<br class="">
&gt;&nbsp; &nbsp; &nbsp;protocol Foo : class {}<br class="">
&gt;<br class="">
&gt; I know that it’s currently a moot point because classes are the only*<br class="">
&gt; reference-semantics type of type in Swift, but it’s conceivable that there might<br class="">
&gt; some day be others. Anyway, I’m not saying it’s a big deal or anything, I’m just<br class="">
&gt; trying to think of any source-breaking changes we might want to make before<br class="">
&gt; Swift 3 drops, and this seems like an easy one.<br class="">
&gt;<br class="">
&gt; - Dave Sweeris<br class="">
&gt;<br class="">
&gt; * I’m not actually sure this is true. I have a very vague recollection about<br class="">
&gt; some protocols getting reference semantics in certain circumstances, but the<br class="">
&gt; memory is so hazy I’m not sure I trust it. Also I can’t remember if the<br class="">
&gt; “indirect” keyword in enums affects the semantics.<br class="">
<br class="">
</div></div>Personally I have always felt “class” was an oddball special case here<br class="">
that's unneeded because we have a perfectly good protocol that means the<br class="">
same thing: AnyObject.<br class="">
<span class="HOEnZb"><font color="#888888" class=""><br class="">
--<br class="">
Dave<br class="">
</font></span><div class="HOEnZb"><div class="h5"><br class="">
_______________________________________________<br class="">
swift-evolution mailing list<br class="">
<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">
</div></div></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div class="gmail_signature"><div dir="ltr" class=""><div class="">Jesse Squires</div><div class=""><br class=""></div><div class=""><div style="line-height: 19px; font-family: helvetica, arial;" class=""><b class="">blog</b> | <a href="http://www.jessesquires.com/" target="_blank" class="">jessesquires.com</a></div><div style="line-height: 19px; font-family: helvetica, arial;" class=""><b class="">github</b> | <a href="http://www.github.com/jessesquires" target="_blank" class="">github.com/jessesquires</a></div><div style="line-height: 19px; font-family: helvetica, arial;" class=""><b class="">hexedbits</b> | <a href="http://www.hexedbits.com/" target="_blank" class="">hexedbits.com</a></div></div></div></div>
</div>
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></div></body></html>