What if we tried a completely different type of solution (which might solve the 
issue for protocol default conformances too)?

Right now there are errors and warnings.  What if we add a third type of 
compiler feedback (let’s call it a note).  A note is a little bit like a 
warning, but it can be dismissed/acknowledged.  It is only generated once for a 
particular issue, and then it is remembered that you dismissed it so it won’t 
come back every time you compile.

So in this case, when you add an Equatable conformance post-hoc, you get a note 
(let’s say it looks like a warning, but is grey instead of yellow and has a 
different icon) saying something like “Equatable conformance was automatically 
synthesized”.  If you want to remember to add your own conformance, you can 
just leave the note there as a reminder to yourself until you do it.  If you 
want the automatic conformance then you just dismiss the note and it never 
bothers you again.

Thanks,
Jon

> On Sep 7, 2017, at 12:52 PM, Xiaodi Wu via swift-evolution 
> <[email protected]> wrote:
> 
> This is a particularly interesting use case that demonstrates a weakness 
> without a good workaround. I, for one, am glad you brought it up, and agree 
> with comments above that auto-generated mandatory enum conformance is a topic 
> perhaps worth revisiting, given this compelling example.
> On Thu, Sep 7, 2017 at 14:32 Gwendal Roué via swift-evolution 
> <[email protected] <mailto:[email protected]>> wrote:
> 
>> Le 7 sept. 2017 à 19:53, Tony Allevato <[email protected] 
>> <mailto:[email protected]>> a écrit :
>> 
>> Again, this is not the issue that Haravikk is describing in this thread.
> 
> Yes, I better understand now. Please forgive the pollution.
> 
> Gwendal
> 
> _______________________________________________
> swift-evolution mailing list
> [email protected] <mailto:[email protected]>
> https://lists.swift.org/mailman/listinfo/swift-evolution 
> <https://lists.swift.org/mailman/listinfo/swift-evolution>
> _______________________________________________
> swift-evolution mailing list
> [email protected]
> https://lists.swift.org/mailman/listinfo/swift-evolution

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

Reply via email to