Re: [swift-evolution] Would having "MyType.Protocol" to indicate a type's protocols mess anything up?

2017-07-03 Thread Daryle Walker via swift-evolution
> On Jul 2, 2017, at 10:15 PM, Christopher Kornher wrote: > > A full-fledged introspection system should provide this information, which I > suppose could be useful for creating proxies through code generation or > dynamic Objective-C like features, should they ever be added

Re: [swift-evolution] Would having "MyType.Protocol" to indicate a type's protocols mess anything up?

2017-07-02 Thread Christopher Kornher via swift-evolution
A full-fledged introspection system should provide this information, which I suppose could be useful for creating proxies through code generation or dynamic Objective-C like features, should they ever be added to the language. Would that be sufficient for your needs? It is not clear to me what

Re: [swift-evolution] Would having "MyType.Protocol" to indicate a type's protocols mess anything up?

2017-07-02 Thread Daryle Walker via swift-evolution
> On Jul 1, 2017, at 2:07 AM, Brent Royal-Gordon wrote: > >> On Jun 30, 2017, at 6:17 PM, Daryle Walker via swift-evolution >> > wrote: >> >> Given a type MyType, how can I get a type-alias to the type’s

Re: [swift-evolution] Would having "MyType.Protocol" to indicate a type's protocols mess anything up?

2017-07-01 Thread Brent Royal-Gordon via swift-evolution
> On Jun 30, 2017, at 6:17 PM, Daryle Walker via swift-evolution > wrote: > > Given a type MyType, how can I get a type-alias to the type’s protocols? If > MyType conforms to Protocol1 and Protocol2, I would want something like > > typealias MyProtocol =

Re: [swift-evolution] Would having "MyType.Protocol" to indicate a type's protocols mess anything up?

2017-06-30 Thread Daryle Walker via swift-evolution
> On Jun 30, 2017, at 9:26 PM, Robert Bennett wrote: > > I’m not at a computer to test this, but would this work: > > typealias T = P1 & P2 > extension C: T {} > > Now T is C.Protocol Is C supposed to be a type or a protocol? I’m guessing a protocol since I don’t

Re: [swift-evolution] Would having "MyType.Protocol" to indicate a type's protocols mess anything up?

2017-06-30 Thread Robert Bennett via swift-evolution
I’m not at a computer to test this, but would this work: typealias T = P1 & P2 extension C: T {} Now T is C.Protocol > On Jun 30, 2017, at 9:17 PM, Daryle Walker via swift-evolution > wrote: > > >> On Jun 30, 2017, at 8:49 PM, Adrian Zubarev >>

Re: [swift-evolution] Would having "MyType.Protocol" to indicate a type's protocols mess anything up?

2017-06-30 Thread Daryle Walker via swift-evolution
> On Jun 30, 2017, at 8:49 PM, Adrian Zubarev > wrote: > > What are you proposing here, I don’t get it?! What role should .Protocol > play? .Protocol is an ugly hack in Swift which should be removed anyway. It > does more harm than good. > I’m not proposing

Re: [swift-evolution] Would having "MyType.Protocol" to indicate a type's protocols mess anything up?

2017-06-30 Thread Adrian Zubarev via swift-evolution
What are you proposing here, I don’t get it?! What role should .Protocol play? .Protocol is an ugly hack in Swift which should be removed anyway. It does more harm than good. Our revised proposal was deferred from Swift 4:

[swift-evolution] Would having "MyType.Protocol" to indicate a type's protocols mess anything up?

2017-06-30 Thread Daryle Walker via swift-evolution
We have MyType.Type to indicate the meta-type of a type. And MyProtocol.Protocol to indicate the meta-type of a protocol. Would it be OK to add MyType.Protocol to identify all the protocols MyType follows? The result would be like if each protocol was connected by