I've been looking at html.arc and have a few comments. One interesting thing is most of the functions are stdout-based. That is, they print output to stdout and they include body code that outputs to stdout. The return values are just noise, and ignored. However, a few operations (prbold, para) inexplicably use the value of their arguments, rather than being stdout-based. So you'd do (underline (pr "hello")) but (prbold "hello"). (And why the inconsistent name for prbold?) And then a few things like td support either atoms or stdout. So there are three different models for wrapping tags around content. The inputs macro is a bit bizarre; if the label for an input is the symbol password, then the input uses the password input type, otherwise the input is a regular text input. Tying the input type to its text label in this way is just wrong. The implementation is very interesting; it uses a bunch of functions opstring, opnum, opsym, etc that generate code. The tag macro is then basically a wrapper around the appropriate function, to turn it into a macro. It looks to me like this is a way of getting the benefits of first-class macros without first-class macros; since the code-generating functions are just functions, they can be put in tables and passed around, and then the macro wrapper makes them work like macros. If you try to use a tag attribute that Arc doesn't know about, it puts a comment in the HTML <!-- ignoring mytag for a-->. Error reporting in the HTML itself seems like a bad idea. Hardwiring the spacer gif to s.gif seems like a bad thing. You could redefine (blank-gif), but that seems ugly. Overall, there are a number of strange hardwired thing, e.g. whitepage defines the link color and sptab defines a cellspacing of 7. underlink: creates a link with <u> underlining around the text. I'm not a CSS zealot, but really. There are three escape functions: pr-escaped, esc<>&, and eschtml. They all escape slightly different characters. Two return strings; one prints output. br2 seems redundant. (It prints two breaks, same as (br 2). I'm planning to write up some documentation on html.arc, but I figured I'd post these comments first. |