<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Feb 15, 2011, at 14:36 , Attila Lendvai wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><blockquote type="cite">- The idea that COMPARE returns symbols also seems weird to me. Wouldn't it be better to return numbers (-1, 0, +1 or NIL)? Can't immediately tell why, though.<br></blockquote><br><br>you need to return well-known identities that communicate the result.<br>-1,0,+1 are the easy way for well-known identities in C. in CL,<br>symbols provide a much nicer framework to deal with well-known<br>identities IMO.<br></div></blockquote><div><br></div><div>That was the thinking.</div><div><br></div><blockquote type="cite"><div><blockquote type="cite">- Shouldn't there also be a hash-code generic function that can be specialized alongside AEQUALIS? This also exists in Java and C#, and could make this immediately more useful (and would be much harder to add later as an afterthought). Many CL implementation add an :sxhash option to make-hash-table, where such a hash-code function could be used.<br></blockquote><br><br>a big +1 for the above.<br></div></blockquote><div><br></div><div><br></div><div>You should but:</div><div><br></div><div><ul class="MailOutline"><li>As in Java (and FWIU in C#) there are no "easy" ways (for an appropriate definition of "easy") to enforce the protocol.</li><li>What would be the default?  Something like</li></ul><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">          </span><font class="Apple-style-span" face="'Courier New'"><b>(defmethod hash-code ((x t)) (sxhash x))</b></font></div></div><div><br></div><div><br></div><div>If you think so, I can add it to the doc.  Always with the caveat that there is no way to enforce the relationship between equality and hashing.</div><div><br></div><div>Marco</div><div><br></div><div>PS.  Yeah.  AEQUALIS is very Latin :)  Any synonym?  I will just vote against EGAL, which I really don't like :)</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><br><blockquote type="cite"><div><br>-- <br> attila<br><br>Notice your eroding (digital) freedom, and do something about it!<br><br>PGP: 2FA1 A9DC 9C1E BA25 A59C  963F 5D5F 45C7 DFCD 0A39<br>OTR XMPP: 8647EEAC EA30FEEF E1B55146 573E52EE 21B1FF06<br>BitCoin: 154uf86Vd9rpjMULd9CXa7nVwikknYZJiB<br><br><br></div></blockquote></div><br><div>--<br>Marco Antoniotti<br><br></div><br></body></html>