On Dec 12, 4:13 pm, Joost <jo...@zeekat.nl> wrote:
> Paul Barry schreef:
>
> > Ok, so it's fair to say the Clojure Reader has syntax.  I don't see
> > how this is fundamentally different than how Ruby works, for example:
>
> >http://www.igvita.com/2008/12/11/ruby-ast-for-fun-and-profit/
>
> > The clojure.lang.LispReader parses an input stream of text into a Java
> > Object, the same way that the Ruby parser parses code into an AST.
>
> Note that there is no standard whatsoever to guarantee that different
> ruby implementations generate the same AST from the same source code.
>
> The difference is that Lisps in general are defined in terms of their
> AST, not in terms of syntax/source file structure. All reader macros/
> syntactic sugar translates directly into defined data structures, and
> the language is defined in terms of those data structures. Since
> clojure doesn't allow for user defined reader macros, and has more
> built-in reader constructs, the "no syntax" mantra is a bit harder to
> maintain, at least superficially, but Common Lisp programs for
> example, can completely do away with S-expressions and still be the
> same language.

I'm not sure Clojure has more built-in reader constructs than Common
Lisp, which has reader syntax for vectors, arrays, pathnames, dotted
pairs, bitvectors, read-time evaluation, labels, label references,
read-time conditionals, many kinds of numbers, functions, balanced
comments and uninterned symbols, in addition to the usual lists,
symbols, strings, numbers and characters.

Rich

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