On Mon, Feb 16, 2009 at 8:31 PM, Brian Will <brian.thomas.w...@gmail.com> wrote:
>
> I'm a bit mystified how syntax quote does what it does. I don't see
> how syntax quote can quote the whole while unquoting parts without
> some evaluation-time intervention. If I had to implement it myself,
> I'd just punt the problem to evaluation-time by introducing a special
> form 'unquote', e.g.:
>
>  `(a b ~(c d))
>
>  (quote ((unquote a) 3 (unquote (c d)))
>
> But this isn't what Clojure does, so I'm wondering, how does syntax
> quote do its business while remaining strictly a reader-time only
> mechanism?

Use the source, Luke.

http://code.google.com/p/clojure/source/browse/trunk/src/jvm/clojure/lang/LispReader.java?r=1287#656

It looks like the reader reads the whole syntax-quoted form, and then
walks it recursively looking for unquote forms.

--Chouser

--~--~---------~--~----~------------~-------~--~----~
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
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