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 p

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

2017-08-10 Thread David Ungar via swift-evolution
osed a mechanism encompassing all protocols, not >>>>> just Equatable and Hashable, to handle the issue of mistakenly believing >>>>> you’re overriding a default implementation. Having trouble finding it at >>>>> the moment. >>>>

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

2017-08-10 Thread David Ungar via swift-evolution
a mechanism encompassing all protocols, not >>> just Equatable and Hashable, to handle the issue of mistakenly believing >>> you’re overriding a default implementation. Having trouble finding it at >>> the moment. >> >> Is this what you’re thinking of? >>

[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

Re: [swift-evolution] [review] SE-0096: Converting dynamicType from a property to an operator

2016-05-24 Thread David Ungar via swift-evolution
-1 I love the desire for consistency in this proposal, but it brings up two issues: 1. Swift’s take on standalone functions vs member functions: As Swift has progressed, it seems to have adopted a preference (which I like) in favor of members over functions that just take arguments. I think tha

[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 a