Alessio Stalla <email@example.com> wrote:
| Right, my cl-who was dusty :) thanks for pointing it out. I wonder why
| it is designed that way... wouldn't it have been more "Lispy" to use
| macros for html tags instead of writing a custom "evaluator/compiler"
| that just treats keywords differently? E.g.
| (p (:style "xxx") ".....")))
| This would have been extensible with user-defined tags, and would have
| avoided htm and friends. But maybe there's a drawback I fail to see...
You can do as you suggest (I believe HTMLGEN does, in fact),
but then you have to worry about namespace collisions between
HTML tags and your macros/functions. You [or your HTML-generating
library] also have to explicitly predefine a macro for every
possible HTML tag you might ever want to emit.
Whereas although HTOUT & CL-WHO do require you to "switch namespaces"
semi-manually with HTM, there's no collision between HTML tags and your
macros/functions, since one normally never defines a macro or function
in the keyword package. Yes, it's a hack, but a convenient one.
Rob Warnock <firstname.lastname@example.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607