[hunchentoot-devel] dispatch-table request

Cyrus Harmon ch-tbnl at bobobeach.com
Mon Dec 4 19:37:23 UTC 2006


Thanks. As Toby and Zach pointed out, there are certainly multiple  
was to address this. I won't bother explaining a use-case for this  
kind of meta-data, as it's easy enough to add these in application- 
specific manner without modifying hunchentoot.

Cyrus

On Dec 4, 2006, at 11:27 AM, Toby wrote:

> 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
> _______________________________________________
> tbnl-devel site list
> tbnl-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/tbnl-devel




More information about the Tbnl-devel mailing list