[Prev][Next][Index][Thread]

html:*output-stream*



At 2:10 PM 7/4/95, Rainer Joswig wrote:
>Hi,
>
>Shouldn't HTML generating macros (like "note-anchor") and functions
>all have "*output-stream*" as the default output stream.
>
>I just was playing around removing all the stream args in
>a little example code, just to see how to make the generating
>code more compact by removing the redundant stream arguments.

Glad to hear that it all works! :-)

It might be useful if we could come up with a more compact syntax for
generating HTML,
perhaps something analogous to format but without the eficiency penalty.
The way to do it
would be to compile out the control string.  I believe Alan Bawden once
wrote such a format
for some application.

Remember that when generating HTML on the fly it is very important
that it be highly efficient and minimize consing for best server performance.

>
>Some forms (like "with-enumeration") require a stream argument
>others have a keyword argument with
>(like "with-section-heading") or without
>(like "note-anchor") a default value.

These are patterned after some of CLIM macros.  Requiring the stream
keeps open certain implementational options such as introducing closures.

In general, it is better to pass in the stream argument explicitly as it will
avoid repeated special variable references and someone reading the code
can see directly what is going on without having to know about
some non-local state, e.g., how some special variable
is bound.

>
>Greetings,
>
>Rainer Joswig
>
>Rainer Joswig, Lavielle EDV Systemberatung GmbH & Co, Lotharstrasse 2ab, D22041
>Hamburg, Tel: +49 40 65808-0, Fax: +49 40 65808-202, Email:joswig@lavielle.com,
>WWW: http://www.lavielle.com/~joswig/, Tel. (priv): +49 40 7355522