Re: [swift-dev] [SE-0143] Dynamic casting for conditional conformances

2017-12-06 Thread John McCall via swift-dev
> On Dec 7, 2017, at 1:03 AM, Slava Pestov wrote: > > > >> On Dec 6, 2017, at 10:00 PM, John McCall wrote: >> >> Yes, I can see how there's some nice synergy there, and it would certainly >> be good to avoid having to eagerly generate code for this operation. And it >> should be possible

Re: [swift-dev] [SE-0143] Dynamic casting for conditional conformances

2017-12-06 Thread Slava Pestov via swift-dev
> On Dec 6, 2017, at 10:04 PM, Slava Pestov via swift-dev > wrote: > >> >> In AST terms: >> func matchEnvironment(GenericSignature, Type, TypeMetadata) -> >> GenericEnvironment? >> func substitute(GenericEnvironment, Type) -> TypeMetadata? > > By GenericEnvironment do you really mean a su

Re: [swift-dev] [SE-0143] Dynamic casting for conditional conformances

2017-12-06 Thread Slava Pestov via swift-dev
> On Dec 6, 2017, at 10:00 PM, John McCall wrote: > > Yes, I can see how there's some nice synergy there, and it would certainly be > good to avoid having to eagerly generate code for this operation. And it > should be possible to optimize the cast operation in the runtime if we find > ours

Re: [swift-dev] [SE-0143] Dynamic casting for conditional conformances

2017-12-06 Thread John McCall via swift-dev
> On Dec 5, 2017, at 7:01 PM, Slava Pestov wrote: > > > >> On Dec 5, 2017, at 3:42 PM, John McCall via swift-dev > > wrote: >> >>> On Dec 5, 2017, at 5:28 PM, Douglas Gregor via swift-dev >>> mailto:swift-dev@swift.org>> wrote: >>> Hi all, >>> >>> The main missin

Re: [swift-dev] [Swift CI] Build Failure: 2. Swift Source Compatibility Suite (master) #880

2017-12-06 Thread Douglas Gregor via swift-dev
Kitura and NetService are passing again Sent from my iPhone > On Dec 6, 2017, at 8:05 PM, no-re...@swift.org wrote: > > [FAILURE] swift-master-source-compat-suite [#880] > > Build URL:https://ci.swift.org/job/swift-master-source-compat-suite/880/ > Project: swift-master-source-compat-s

[swift-dev] Getting started with lib/Syntax

2017-12-06 Thread Yurii Samsoniuk via swift-dev
I have some spare time and I want to do something for Swift. I’m interested in lib/Syntax. What can a beginner do? What’s a not too complicated problem I can solve? Cheers, Yura ___ swift-dev mailing list swift-dev@swift.org https://lists.swift.org/mailm

Re: [swift-dev] [Questions][SE-143]Conditional conformances for protocols?

2017-12-06 Thread Robert Widmann via swift-dev
See Conditional Conformances via Protocol Extensions . > On Dec 6, 2017, at 11:05 AM, Cao, Jiannan via swift-dev > wrote: > > Recently, we can use conditional conformances for

[swift-dev] [Questions][SE-143]Conditional conformances for protocols?

2017-12-06 Thread Cao, Jiannan via swift-dev
Recently, we can use conditional conformances for struct/class. > extension Array: Equatable where Self.Element : Equatable { ... } Could we use conditional conformances for protocols? For example: > extension Collection : Equatable where Self.Element : Equatable { ... } Thanks! Jiannan __

[swift-dev] [Question] Why StringProtocol not inherit RangeReplaceableCollection?

2017-12-06 Thread Cao, Jiannan via swift-dev
Hi everyone, I have a question about StringProtocol. Since String and Substring are adopted RangeReplaceableCollection, why StringProtocol not inherit RangeReplaceableCollection? Also consider StringProtocol could inherit: CustomDebugStringConvertible CustomPlaygroundQuickLookable CustomReflecta

[swift-dev] [Question] Why StringProtocol not inherit RangeReplaceableCollection?

2017-12-06 Thread Cao, Jiannan via swift-dev
Hi everyone, I have a question about StringProtocol. Since String and Substring are adopted RangeReplaceableCollection, why StringProtocol not inherit RangeReplaceableCollection? Also consider StringProtocol could inherit: CustomDebugStringConvertible CustomPlaygroundQuickLookable CustomReflecta