<html><head></head><body>+1 Yes please, get rid of the `class` keyword from protocols already and replace it with better implicit &nbsp;protocols.<div><br></div><div>I posted the idea two weeks ago, but no one answered to it:&nbsp;<a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160418/015568.html">https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160418/015568.html</a></div><div><br></div><div>Replacing `class` with something like `protocol AnyReference` is the first step to add a few more implicit protocols like `AnyValue` to Swift. We could build value or reference type specific libraries and overload correctly.<br> <br><div class="bloop_sign"><div>--&nbsp;<br>Adrian Zubarev</div></div> <p class="gmail_quote" style="color:#000;">Am 2. Mai 2016 um 15:55:15, David Sweeris via swift-evolution (<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>) schrieb:</p> <blockquote type="cite" class="gmail_quote"><span><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div></div><div>



<title></title>


I was just thinking that:
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class="">
<div class="">
<div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(187, 44, 162);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">protocol</span> <span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">Foo :</span> <span style="font-variant-ligatures: no-common-ligatures" class="">reference</span> <span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">{}</span></div>
</div>
</blockquote>
<div class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""></span>
<div style="margin: 0px; line-height: normal;" class="">
<span style="font-variant-ligatures: no-common-ligatures;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">might be more to the point than:</span></span></div>
</div>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class="">
<div class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""></span>
<div style="color: rgb(187, 44, 162); margin: 0px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">protocol</span> <span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">Foo :</span> <span style="font-variant-ligatures: no-common-ligatures" class="">class</span>
<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">{}</span></span></div>
</div>
</blockquote>
<div class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""></span>
<div style="color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""><br class=""></span></div>
<div style="color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">I know that
it’s currently a moot point because classes are the only*
reference-semantics type of type in Swift, but it’s conceivable
that there might some day be others. Anyway, I’m not saying it’s a
big deal or anything, I’m just trying to think of any
source-breaking changes we might want to make before Swift 3 drops,
and this seems like an easy one.</span></div>
<div style="color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""><br class=""></span></div>
<div style="color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">- Dave
Sweeris</span></div>
<div style="color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""><br class=""></span></div>
<div style="color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">* I’m not
actually sure this is true. I have a very vague recollection about
some protocols getting reference semantics in certain
circumstances, but the memory is so hazy I’m not sure I trust it.
Also I can’t remember if the “indirect” keyword in enums affects
the semantics.</span></div>
</div>


_______________________________________________<br>swift-evolution mailing list<br>swift-evolution@swift.org<br>https://lists.swift.org/mailman/listinfo/swift-evolution<br></div></div></span></blockquote>
    </div></body></html>