[hunchentoot-devel] dispatch-table request

Toby tobia.conforto at linux.it
Mon Dec 4 19:27:11 UTC 2006


Cyrus Harmon wrote:
> extend the dispatch table to provide metadata for each dispatcher

Quick way: you can use the documentation strings of the dispatchers to
hold arbitrary metadata.  You can usually put all kinds of stuff in a
'documentation string', in spite of its name, and get away with it.

http://www.lisp.org/HyperSpec/Body/stagenfun_doc_umentationcp.html

But!  "Conforming programs should not depend for their correct behavior
on the presence of those documentation strings.  An implementation is
permitted to discard documentation strings at any time..."

So here's a standards-compliant way: put all your metadata into a global
hash-table indexed on the dispatchers themselves.

In either case I suggest writing your own create-...-dispatcher helper
functions to populate the metadata.


Toby



More information about the Tbnl-devel mailing list