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

Jan E. Schotsman jeschot at xs4all.nl
Sat Feb 13 04:44:34 CST 2016


On Feb 12, 2016, at 11:21 PM, Daniel Tartaglia wrote:

> I would like to see Swift auto-generate the == operator if a struct  
> implements Equatable

I wrote up a proposal for this but I was told it needed more  
discussion before it could be reviewed.

https://github.com/jeschot/swift-evolution/blob/master/proposals/Swift%20proposal.txt

> Obviously, it would only be able to do this if all the structs  
> members implemented Equatable themselves.


Or provide a basis on which the developer can expand. See my proposal.

If Dave Sweeris is right and the proposal is currently difficult to  
implement then it'll have to wait...

Jan E.


More information about the swift-evolution mailing list