> Templating does not require eval.

I don't recall saying it did.

I think you misunderstood what I said. I was musing about implementing 
PHP-style templating in Clojure, and I was wondering whether it was possible to 
avoid calling eval on each render.

Someone has implemented PHP-style templating in Clojure:

http://www.brool.com/index.php/a-modest-proposal

And he does have some eval's in there:

http://github.com/brool/gulliver/blob/master/template-servlet.clj

But my Clojure knowledge isn't yet good enough to tell me whether he's using 
eval only once or on every render?

- Greg

On Feb 4, 2010, at 8:09 PM, Richard Newman wrote:

>> Enlive has to reconstruct HTML from its data structures. This, on the other 
>> hand, mostly just prints already "rendered" strings, and calls any clojure 
>> functions/macros along the way.
> 
> Most CL/Clojure HTML output systems, like clj-html or CL-WHO, produce optimal 
> output by processing the macro input. See
> 
> http://weitz.de/cl-who/
> 
> for a description. This is one of the reasons to use macros: you can do a 
> huge amount of work once, at compile-time, leaving the runtime with less to 
> do.
> 
> Templating does not require eval.
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to