> On Apr 29, 2016, at 10:38 AM, Xiaodi Wu via swift-evolution 
> <[email protected]> wrote:
> 
> I'd be keenly interested in something that would improve the experience of 
> conforming a type to a protocol. I think others would as well. A sufficiently 
> sophisticated solution would:
> 
> * catch unintentional typos that cause required functions to be incorrectly 
> named
> * show, ideally prospectively, which required functions have default 
> implementations
> * clarify (and this is obviously a cherry-on-top scenario) what protocol 
> requirements any particular function helps to satisfy as well as which 
> combination of implementations is used to synthesize a default implementation 
> of another function (e.g. <= synthesized from < and ==; this would help to 
> determine whether it might be more efficient to roll your own override)
> * support all retroactive modeling scenarios currently supported
> 
> I tried to propose a keyword-based solution (less sophisticated than yours) a 
> while back, and I've been convinced that the drawbacks in terms of decreased 
> expressiveness in retroactive modeling might be insurmountable. Perhaps it 
> would be worthwhile exploring improvements in tooling and documentation 
> (including annotation of the code itself) in order to address some of these 
> areas?

Yeah, I think this is something that tooling / editors could really help with.  
I would love it if when I typed:

        struct Foo: Bar

or

        extension Foo: Bar

a skeleton with the missing Bar APIs was auto-generated for me to fill in.  
This would make it much easier to get conformances right, and require less 
typing instead of more.

– Steve
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to