<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">Le 12 sept. 2017 à 17:26, Tony Allevato <<a href="mailto:tony.allevato@gmail.com" class="">tony.allevato@gmail.com</a>> a écrit :</div><br class="Apple-interchange-newline"><div class=""><div style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Since your game involves the specific question of a property that should not be considered for Equatable synthesis, and since SE-0185 explicitly calls out the notion of transient properties as a future direction to solve that specific problem, then my solution is "I declare the property as transient."</div><div style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Surely this is an acceptable solution? It achieves the goal you set, and more concisely/quickly than the ways you proposed in that post. It doesn't require me to go fishing through code; the act of adding the property and making it transient is completely localized to one place (it's one line!). If there's a synthesized implementation of Equatable, then the property gets ignored as desired. If there's a handwritten implementation, then the new property is already ignored because it wasn't there to begin with, but the transient declaration still provides valuable information to the reader of the code about the intention.</div><div style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">If the rebuttal to that is going to be "a developer may not know about transient", then where do we draw the line at expecting users to know how to use the features their language? It's a significant leap to go from "developers might do the wrong thing" to "so this specific approach is the only right way to fix it."</div></div></blockquote></div><br class=""><div class="">Your answer is totally valid in a world where properties can be declared transient.</div><div class=""><br class=""></div><div class="">So you may now be aware that in a world where there are no transient properties, implicit synthesis of Equatable and Hashable conformance has problems that explicit synthesis has not. Making more people aware of this is my only goal in this thread.</div><div class=""><br class=""></div><div class="">Gwendal</div><div class=""><br class=""></div></body></html>