Auto-generate op==?


(J.E. Schotsman) #1

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.

ยทยทยท

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