[swift-evolution] Specify type of a delegate which conforms to a protocol
ccruden at novafore.com
Thu Feb 11 07:45:47 CST 2016
> On 2016-02-11, at 20:38:21, Ross O'Brien via swift-evolution <swift-evolution at swift.org> wrote:
> 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.
> The next issue I'd see with the union type is that it's the already proposed Either type.
> — Ross
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).
Whereas, union and intersection types are basically making changes to the type system itself — is it not?
More information about the swift-evolution