2012/4/11 Cedric Greevey <[email protected]>

> On Wed, Apr 11, 2012 at 3:56 AM, Alex Shabanov <[email protected]>
> wrote:
> > Here is the quick clojure sample:
> >
> > user=> (def p1 `(or a b))
> > #'user/p1
> > user=> (def p2 '(or a b))
> > #'user/p2
> > user=> (= (first p1) 'or)
> > false
> > user=> (= (first p2) 'or)
> > true
> >
> > At the same time this seems unique to clojure as the clisp behavior
> differs:
> >
> > [1]> (setf p1 `(or a b))
> > (OR A B)
> > [2]> (setf p2 '(or a b))
> > (OR A B)
> > [3]> (eq (first p1) 'or)
> > T
> > [4]> (eq (first p2) 'or)
> > T
> >
> > The difference in quoted and backquoted form interpretation by the reader
> > strikes me as odd - why imported symbols (like `or') treated in different
> > ways?
>
> `or becomes user/or rather than just or. (In fact, the first part will
> be the namespace where the `or is.)

Yes, I understand that. I am curious why the clojure reader was designed in
that way?
I always thought of backquoted forms as of convenient way to introduce
variables in the uninterpreted list so the backquoted form may be replaced
with the quoted form (or, say, conjunction of a few quoted forms) in some
circumstances.

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

Reply via email to