[racket-dev] Removing Xexpr preference from Web Server
Two hours ago, Neil Van Dyke wrote:
> Eli Barzilay wrote at 11/30/2010 06:36 AM:
> > The ones I ran into, at least with xexprs: they rely on lots of
> > quasi/quotes etc and it's easy to end up with things like
> > "<quote>nbsp</quote>".
>
> I make errors of not getting my quotes, backquotes, and commas in
> the right place sometimes, but those errors tend to be discovered
> quickly.
(The above errors were all over the old pages for years without being
discovered...)
> > A related problem is the difference between contexts that expect a
> > single value and contexts that expect a list of values -- with one
> > solution of changing an `unquote' to `unquote-splicing' and the
> > usual problems that this can lead to, or going with the bad
> > "<span>stuff</span>" hack.
>
> I ran into this potential pitfall when I was doing PLT servlets with
> xexprs. It's not so much an issue in SXML, since (for better or
> worse) SXML permits unnecessary paren nesting, so you never have to
> splice.
Yeah, that was my conclusion too, and `scribble/html' does just that
(actually it inherits it from `scribble/text').
BTW, another minor disadvantage with xexprs is that you need a
separate rendering pass if you want to have references such as a TOC.
The `scribble/html' thing allows promises and thunks which makes it
easier to deal with.
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!