I've been reading the latest chapter from Stuart's book, Chapter 7: Macros, and he makes this statement:
"Clojure has no special syntax for code. Code is simply Clojure data. This is true for normal functions, but also for special forms and macros. Consider a language with syntax, such as Java. ..." It seems to me that just like all lisps, Clojure has syntax. The first and most obvious piece of syntax is the parenthesises. Lists start with an open paren and end with a closing paren. This is syntax and you can't change it with a macro. Next is the single quote, which is just an alias for quote. Somewhere along the line, someone decided that (quote foo) was too verbose and they wanted 'foo to be syntactic sugar for (quote foo). That wasn't and can't be done as a macro. For example, if I wanted to define my own single quote, say $foo, I can't without modifying the parser. Clojure goes on to add a lot of syntax. The literal syntax for vectors [], maps {}, sets #{}, functions #(), keywords :, etc. are all syntax, not possible with macros, and then there are all the "reader macros" that are listed in Section 2.2, Comment ;, Deref @, Meta ^, Metadata #^, regex #"", syntax-quote `, unquote ~, unquote-splicing ~@, and var-quote #'. So is it really valid to claim Clojure has no syntax? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---