Re: [swift-evolution] [Accepted] SE-0185 - Synthesizing Equatable and Hashable conformance

2017-08-19 Thread David Ungar via swift-evolution
Chris Lattner wrote: > Also, if I were to nitpick your argument a bit, it isn’t true that the > protocol knows “nothing" about the type anyway, because the protocol has > access to self. The default implementation could conceptually use reflection > to access all the state in the type: we’re

Re: [swift-evolution] SE-0185 Synthesizing Equatable and Hashable conformance

2017-08-10 Thread David Ungar via swift-evolution
org>> wrote: >>>>> >>>>> I could have sworn that this sort of issue came up on this list earlier >>>>> this year… Someone proposed a mechanism encompassing all protocols, not >>>>> just Equatable and Hashable, to handle the issue o

Re: [swift-evolution] SE-0185 Synthesizing Equatable and Hashable conformance

2017-08-10 Thread David Ungar via swift-evolution
aving trouble finding it at >>> the moment. >> >> Is this what you’re thinking of? >> https://github.com/apple/swift-evolution/pull/724 >> <https://github.com/apple/swift-evolution/pull/724> >> >> -Chris >> >> >> &g

[swift-evolution] SE-0185 Synthesizing Equatable and Hashable conformance

2017-08-10 Thread David Ungar via swift-evolution
If I understand it, merely adding Equatable or Hashable will cause the compiler to synthesize requirements. This syntax opens up the possibility for errors: struct Snort: Hashable { static var hashValu /* NOTE MISSPELLING */ : Int { return 666 } } In the above example, the programmer meant to

[swift-evolution] SE-0025: Scoped Access Level, next steps

2016-03-18 Thread David Ungar via swift-evolution
First post to Swift evolution, please bear with me: the following is a bit wild, but something to think about for the future, maybe. Swift had three, and will now have four levels of scoping. In the future, might there be five? A scope that spans a limited set of modules, or a scope that only