<div dir="ltr">Another alternative is to add a protocol extension with blank/harmless/default methods for things that are optional and always call 'em.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 30, 2016 at 7:18 AM, Haravikk via swift-evolution <span dir="ltr"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I’m not sure, why not just define an additional protocol with the optional method(s) you’d like to add? The whole point of protocols is to guarantee access to some baseline capability, so I’m not sure that optional capabilities are well covered except by adding new protocols that extend each other.<br>
<br>
Objective-C conversion has the ability because Objective-C is unusual by comparison thanks to its ability to have “method calls” (messages) with no actual destination. I think it’s good for Swift to be more structured and strict than that.<br>
<div><div class="h5"><br>
> On 30 Mar 2016, at 15:08, Yuval Tal via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br>
><br>
> Hi,<br>
><br>
> I find that optional protocol methods to be very useful. However, there is a caveat -- it needs to be mapped to @objc. This puts a set of limitations, such as: structures cannot be used as parameters as it does not map to objective-c. What do you think about removing the requirement of using @objc and allow to create optional methods without these limitations?<br>
><br>
> Thank you,<br>
><br>
> -Yuval<br>
</div></div>_______________________________________________<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/mailman/listinfo/swift-evolution</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">kurt@CircleW.org<br><a href="http://www.CircleW.org/kurt/" target="_blank">http://www.CircleW.org/kurt/</a><br></div>
</div>