[racket] Web application question.
Dear list members,
In "Continue Web applications in Racket" it gives this example of creating
dynamic webpages using quosiquotes:
; render-greeting: string -> response
; Consumes a name, and produces a dynamic response.
(define (render-greeting a-name)
(response/xexpr
`(html (head (title "Welcome"))
(body (p ,(string-append "Hello " a-name))))))
In "Web applications in Racket" it gives this example of creating dynamic
webpages using @syntax in a template:
"simple.html" contains:
------------------------------------------------------------------------
<html>
<head><title>Fastest @thing in the West!</title></head>
<body>
<h1>Bang!</h1>
<h2>Bang!</h2>
</body>
</html>
------------------------------------------------------------------
(let ([thing "Templates"])
(include-template "simple.html"))
============================
Can someone tell me, is there some advantage or added funtionality in using
the @syntax in a template over the first example using quosiquotes?
Thanks in advance,
Harry Spier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120116/87d84d07/attachment.html>