> On Dec 15, 2017, at 10:08 AM, Wallacy <[email protected]> wrote:
> 
> Is possible to make the compile check what is used inside of == and then 
> provide the hash value? And if compile cannot check (for whatever reason) 
> what’s properties is used inside == then raise a compile error?

That kind of analysis would be brittle and error-prone. As Tony noted, it might 
be interesting at some point to have a more declarative means of describing 
what properties get used to synthesize structural operations on a type, which 
might allow you to override the default behavior in one place and still get 
consistent synthesized operations in terms of a different set of properties. 
That would be a whole new feature, though, that would take longer to discuss 
and design.

-Joe

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to