[cdr-discuss] CDR-2 -- register-test-designator vs. keyword parameters

Chris Dean ctdean at sokitomi.com
Wed Dec 6 00:19:20 UTC 2006


Why does genhash use the technique of registering hashing functions
and equality predicates instead of using keyword parameters?

Both LispWorks and Allegro use keyword parameters so that you can say

   (make-hash-table :test 'my-equal? :hash-function 'my-hash)

http://www.lispworks.com/documentation/lw50/LWRM/html/lwref-86.htm
http://www.franz.com/support/documentation/8.0/doc/implementation.htm#cl-make-hash-table-2

I find this more natural and intuitive that having a separate
register-test-designator function.  The register-test-designator seems
too much like "action at a distance".

To be fair SBCL has a technique similar to the CDR-2 proposal
(see sb-ext::define-hash-table-test).

Cheers,
Chris Dean



More information about the cdr-discuss mailing list