[racket] comments requested from users of SXML and PLT xexprs

From: Neil Van Dyke (neil at neilvandyke.org)
Date: Tue Dec 21 09:20:47 EST 2010

Noel Welsh wrote at 12/21/2010 09:06 AM:
> On Tue, Dec 21, 2010 at 1:52 PM, Neil Van Dyke <neil at neilvandyke.org> wrote:
>   
>> Note that the special syntax of the template library does not and will never permit extraneous nesting in the static (Racket syntax) portions of the template.  Extraneous nesting is a convenience for dynamic parts.
>>     
>
> Can you expand on this template library. I'm not sure what you're referring to here, but I'm interested.
>   

Heh, "expand on this template". :)

I mentioned an old version of this library a long time ago, and I think 
Untyped released something similar.

Here's a simple example, which doesn't demonstrate all the features:

  (html-template
    (html (head (title "Foo & Bar"))
          (body (h1 (*value* essay-title))
                (p "Bunnies are nice." (br) "Yep."))))

expands to:

  (begin (display "<html><head><title>Foo &amp; 
Bar</title></head><body><h1>")
          (write-html essay-title)
          (display "</h1><p>Bunnies are nice.<br />Yep.</p></body></html>"))

Compared to the traditional dynamic lists with SXML and xexprs, it's 
easier and less error-prone to code, more static checking is possible, 
and plausibly better run-time performance.

I've been refining the language in 4 new libraries, as one library 
informs another.

-- 
http://www.neilvandyke.org/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20101221/360da90a/attachment.html>

Posted on the users mailing list.