[swift-evolution] [Draft] Automatically deriving Equatable and Hashable for certain value types

Chris Lattner clattner at apple.com
Mon May 30 15:33:46 CDT 2016


> On May 30, 2016, at 12:04 PM, Michael Peternell via swift-evolution <swift-evolution at swift.org> wrote:
> 
> It seems that there are two groups here. 1) Group 1 wants Equatable (and others) be derived automatically unless specifically overridden: similar to auto-synthesis of properties in Objective-C. 2) The other group (Group 2) wants Equatable (and others) be derived explicitly using a `deriving` keyword (or something semantically equivalent). Unless I missed something, there were no voices for keeping the status quo, and not introducing any process to automatically derive these protocols.

FWIW, I’m pretty firmly in “camp 2” by the definition above.

That said, any work in this area is significantly outside the scope of what we can do in Swift 3, so I can’t engage in further discussion until we can get past the things that are pressing and critical for this release.  PRs for an evolution proposal along these lines won’t be accepted until Swift 3 is winding way down, and at that point, we’ll have to have the whole “pitch” discussion again.

-Chris


More information about the swift-evolution mailing list