[swift-evolution] Auto-generate op==?

Brent Royal-Gordon brent at architechies.com
Sat Feb 13 17:46:11 CST 2016

> I discussed this recently,  there are two things that might be worth considering at the same time:
> 	• There should probably be an attribute so that we can indicate properties that should not be compared. This would also be a useful way to tell the compiler to ignore non-equatable values if we don’t actually care about them in the comparison.
> 	• It might be nice now or in future if we could also build upon the auto-generated implementation. For example, by marking properties as ignored like I say, we could then add custom code for these while still letting the compiler auto-generate the simpler cases for us.

I'd worry that this might lead us into the same territory that got memberwise init into trouble.

Brent Royal-Gordon

More information about the swift-evolution mailing list