<div dir="ltr">Apologies.<div>For the sake of clarity: I had understood the term 'intersection type' to be referring to the concept in the original post of this thread - a type which conforms to one type and all of a given collection of protocols (i.e. to be a valid value of this type an instance must conform to the intersection of all of these things), and a 'union type' to conform to one option in each series of options in a type.</div><div>e.g. if a type is a subclass of UIViewController and conforms to UITableViewDataSource then - according to my misunderstanding - it would be an eligible value for a variable of "intersection type" all<UIViewController, UITableViewDataSource>, whereas if it conforms to either UITableViewDataSource OR UITableViewDelegate then it would be eligible for a variable of "union type" any<UIViewController, (UITableViewDataSource | UITableViewDelegate)>. I got confused by the terminology used in the thread (it sounded good).</div><div><br></div><div>So, to rephrase (hopefully) more correctly:</div><div>I think this proposal should stick with the 'all' type: a type which inherits from at most one class and conforms to all of a specified collection of protocols.</div><div><br></div><div>'any', intersection types, union types, and Either should be a different proposal.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 11, 2016 at 1:45 PM, Craig Cruden <span dir="ltr"><<a href="mailto:ccruden@novafore.com" target="_blank">ccruden@novafore.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> On 2016-02-11, at 20:38:21, Ross O'Brien via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br>
><br>
> I think this proposal should stick to the intersection type: a type which inherits from at most one class (multiple inheritance should definitely be a separate proposal) if it conforms to all of one or more specified protocols.<br>
><br>
</span><span class="">> The next issue I'd see with the union type is that it's the already proposed Either type.<br>
><br>
</span>> — Ross<br>
<br>
Actually, no the union type has not been proposed. It has been slightly talked about in the Either type discussion. Either was a simple implementation that could do 80% of the use cases of type unions would allow (with 1% of the work :p).<br>
<br>
Whereas, union and intersection types are basically making changes to the type system itself — is it not?<br>
<br>
<br>
<br>
<br>
</blockquote></div><br></div>