[swift-evolution] Mark protocol methods with their protocol
Charles Srstka
cocoadev at charlessoft.com
Tue Sep 20 11:03:22 CDT 2016
> On Sep 20, 2016, at 10:56 AM, Vladimir.S via swift-evolution <swift-evolution at swift.org> wrote:
>
> Then, shouldn't we disallow protocol conformance 'in-place' in type's definition? So, if you need to conform to protocol - only extension is the syntax for this. In this case I can understand the idea. Otherwise - can't.
You can’t completely restrict protocol conformance to extensions, because extensions can’t contained stored properties. Thus, to satisfy a protocol requirement with a stored property, it must be placed in the type’s definition.
Charles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160920/0d0c52da/attachment.html>
More information about the swift-evolution
mailing list