[cdr-discuss] AEQUALIS and COMPARE

Attila Lendvai attila.lendvai at gmail.com
Tue Feb 15 13:36:03 UTC 2011


> - 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.


you need to return well-known identities that communicate the result.
-1,0,+1 are the easy way for well-known identities in C. in CL,
symbols provide a much nicer framework to deal with well-known
identities IMO.



> - 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.


a big +1 for the above.

-- 
 attila

Notice your eroding (digital) freedom, and do something about it!

PGP: 2FA1 A9DC 9C1E BA25 A59C  963F 5D5F 45C7 DFCD 0A39
OTR XMPP: 8647EEAC EA30FEEF E1B55146 573E52EE 21B1FF06
BitCoin: 154uf86Vd9rpjMULd9CXa7nVwikknYZJiB




More information about the cdr-discuss mailing list