On Aug 13, 3:43 pm, Daniel Lyons <fus...@storytotell.org> wrote:
> On Aug 13, 2009, at 3:35 PM, Bradbev wrote:
>
>
>
>
>
> > What is the main point of reader macros?  Is it so you can define your
> > own short-hand syntax, or is it the ability to get more direct access
> > to the reader?
> > If it is the first point, then I'd be happy to not have them - to me
> > shorthand doesn't buy much.
> > If it is the second point then why not simply have the reader pipe raw
> > text into a reader macro?
> > Ie, usage would be like
> > (def-reader-macro pass-through [raw-string]
> >  (read-string raw-string))
>
> > Usage would be (pass-through (+ 1 2)).  The pass-through call would be
> > given "(+ 1 2)" in the raw-string argument and must return a value
> > that can be eval'd.
>
> > More complex "reader" macros could be (infix x + y + z / 3).
>
> I think you can already do that with regular macros.

I don't think so.  Macros are invoked after the read stage but before
evaluation of arguments.  This kind of macro would be invoked without
the text going through any kind of reader expansion.

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