<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><div style="direction: inherit;">class A &lt;P&gt;</div><div style="direction: inherit;"><br></div><div style="direction: inherit;">;)?</div><br>Sent from my iPhone</div><div><br>On 22 Jul 2016, at 18:42, Leonardo Pessoa &lt;<a href="mailto:me@lmpessoa.com">me@lmpessoa.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><span>It would still cause confusion if you were only to conform to a single</span><br><span>protocol (P in "class A : P" is a class or a protocol?). This can be</span><br><span>solved in code but I don't think it is necessary.</span><br><span></span><br><span>L</span><br><span></span><br><span></span><br><span>On 22 July 2016 at 14:08, Goffredo Marocchi via swift-evolution</span><br><span>&lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:</span><br><blockquote type="cite"><span>I think that the current approach marks a regression in declarative</span><br></blockquote><blockquote type="cite"><span>expressiveness as the notion of extending a class over implementing a</span><br></blockquote><blockquote type="cite"><span>protocol is blurred while the concepts are IMHO not the same (the latter is</span><br></blockquote><blockquote type="cite"><span>about behaviour conformance not a is a relationship):</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Class/struct B : Class/struct A &lt;Protocol1 &amp; Protocol2&gt;</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>would be a clear and concise way to express it that would not be confused</span><br></blockquote><blockquote type="cite"><span>even at a quick glance.</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Sent from my iPhone</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>On 22 Jul 2016, at 14:47, Charlie Monroe via swift-evolution</span><br></blockquote><blockquote type="cite"><span>&lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>I agree that this is an issue. Mostly nowadays when more and more classes in</span><br></blockquote><blockquote type="cite"><span>Swift do not have a superclass - it simply looks weird:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>class MyClass: DataSource</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>One doesn't know whether "DataSource" is a class, protocol, etc.</span><br></blockquote><blockquote type="cite"><span>Nevertheless, I do not feel that :: is the answer. I really liked, how ObjC</span><br></blockquote><blockquote type="cite"><span>did it (which isn't possible with the generics now - is it?), but what about</span><br></blockquote><blockquote type="cite"><span>something like this?</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>class BaseClass [SomeDelegate, OtherDelegate, ProtocolX]</span><br></blockquote><blockquote type="cite"><span>class MyClass: BaseClass [SomeDelegate, OtherDelegate, ProtocolX]</span><br></blockquote><blockquote type="cite"><span>extension MyClass [OtherProtocol]</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>On Jul 22, 2016, at 3:14 PM, Vladimir.S via swift-evolution</span><br></blockquote><blockquote type="cite"><span>&lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>I remember that this was discussed, but can't find any decision regarding</span><br></blockquote><blockquote type="cite"><span>this.. So, as a last chance, don't we want in Swift 3.0, as big source</span><br></blockquote><blockquote type="cite"><span>breaking change, separate class inheritance and protocol conformance in</span><br></blockquote><blockquote type="cite"><span>syntax?</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Sorry if there was a decision about this suggestions. Please let know in</span><br></blockquote><blockquote type="cite"><span>this case.</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>I.e. when I see the following I can't understand if the class inherits from</span><br></blockquote><blockquote type="cite"><span>base class and conforms to protocols or just conforms to two protocols:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>class MyClass : First, Second, Third {</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>}</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>We don't have a rule to name protocols with 'Protocol'/other suffix/prefix,</span><br></blockquote><blockquote type="cite"><span>or classes with 'T'/'C' prefix or something like this, so I believe to</span><br></blockquote><blockquote type="cite"><span>improve the clarity of code we should separate in syntax inheritance and</span><br></blockquote><blockquote type="cite"><span>conformance.</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>As I understand we should discuss changes in these areas:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>1. class inheritance :</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>class Child: BaseClass</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>2. class conformance :</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>class Child: SomeProtocol1, SomeProtocol2</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>3. class inheritance + conformance :</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>class Child: BaseClass, SomeProtocol1, SomeProtocol2</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>4. protocol conformance for structs:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>struct Struct: SomeProtocol1, SomeProtocol2</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>5. protocol inheritance:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>protocol Child: BaseProtocol1, BaseProtocol2</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>My suggestions:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>I) separate inheritance with double colon :</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>1. class inheritance :</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>class Child:: BaseClass</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>2. class conformance :</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>class Child: SomeProtocol1, SomeProtocol2</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>3. class inheritance + conformance :</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>class Child:: BaseClass : SomeProtocol1, SomeProtocol2</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>4. protocol conformance for structs:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>struct Struct: SomeProtocol1, SomeProtocol2</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>5. protocol inheritance:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>protocol Child:: BaseProtocol1, BaseProtocol2</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>II) in class definition use parenthesis to separate inheritance and</span><br></blockquote><blockquote type="cite"><span>conformance :</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>1. class inheritance :</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>class Child: BaseClass</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>2. class conformance :</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>class Child: (SomeProtocol1, SomeProtocol2)</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>3. class inheritance + conformance :</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>class Child: BaseClass (SomeProtocol1, SomeProtocol2)</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>4. protocol conformance for structs:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>struct Struct: SomeProtocol1, SomeProtocol2</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>or</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>struct Struct: (SomeProtocol1, SomeProtocol2)</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>should be discussed</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>5. protocol inheritance:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>protocol Child: BaseProtocol1, BaseProtocol2</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>III) special word like 'conforms'</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>1. class inheritance :</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>class Child: BaseClass</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>2. class conformance :</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>class Child: conforms SomeProtocol1, SomeProtocol2</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>or</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>class Child conforms SomeProtocol1, SomeProtocol2</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>3. class inheritance + conformance :</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>class Child: BaseClass conforms SomeProtocol1, SomeProtocol2</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>4. protocol conformance for structs:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>struct Struct: conforms SomeProtocol1, SomeProtocol2</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>or</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>struct Struct conforms SomeProtocol1, SomeProtocol2</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>5. protocol inheritance:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>protocol Child: BaseProtocol1, BaseProtocol2</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Thoughts?</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>_______________________________________________</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>swift-evolution mailing list</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>_______________________________________________</span><br></blockquote><blockquote type="cite"><span>swift-evolution mailing list</span><br></blockquote><blockquote type="cite"><span><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a></span><br></blockquote><blockquote type="cite"><span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>_______________________________________________</span><br></blockquote><blockquote type="cite"><span>swift-evolution mailing list</span><br></blockquote><blockquote type="cite"><span><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a></span><br></blockquote><blockquote type="cite"><span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote></div></blockquote></body></html>