+1 Yes please, get rid of the `class` keyword from protocols already and 
replace it with better implicit protocols.  

I posted the idea two weeks ago, but no one answered to it: 
https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160418/015568.html
  

Replacing `class` with something like `protocol AnyReference` is the first step 
to add a few more implicit protocols like `AnyValue` to Swift. We could build 
value or reference type specific libraries and overload correctly.

--  
Adrian Zubarev  

Am 2. Mai 2016 um 15:55:15, David Sweeris via swift-evolution 
(swift-evolution@swift.org(mailto:swift-evolution@swift.org)) schrieb:

>  
> I was just thinking that:  
> > protocol Foo : reference {}
> >  
>  
> might be more to the point than:
>  
> > protocol Foo : class {}
> >  
>  
>  
> I know that it’s currently a moot point because classes are the only* 
> reference-semantics type of type in Swift, but it’s conceivable that there 
> might some day be others. Anyway, I’m not saying it’s a big deal or anything, 
> I’m just trying to think of any source-breaking changes we might want to make 
> before Swift 3 drops, and this seems like an easy one.  
>  
> - Dave Sweeris  
>  
> * I’m not actually sure this is true. I have a very vague recollection about 
> some protocols getting reference semantics in certain circumstances, but the 
> memory is so hazy I’m not sure I trust it. Also I can’t remember if the 
> “indirect” keyword in enums affects the semantics. 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution@swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to