Just to add a bit of contradiction to the debate: it is generally told to
people coming to lisp that "lisp is all about giving power to users, and
it's up to them to take care of not shooting themselves in the foot".
E.g. that' the general answer when one complains that there's no static
typing with compiler checks, macros; ...

Why make an exception for reader macros, then ? :-) Is there a limit to the
power users can have in their hands, finally ? ?? :-) :-) :-)

More seriously, I don't have enough reader macro background, but I feel they
may be as macros vs functions : of less frequent use, but when you need
them, well.. you need them !

For example, "fixing" the "static" literal string by adding variables :
(str "Hello " laurent ", how are you ? " greetings)  "fixed" with ""Hello
${laurent}, how are you ? ${greetings}"  (it's just an example)


So I'd say : if current implementations of reader macros (e.g. in CL) have
problems (composability, combination of librairies), let's fix them !
Rich already did that with syntax quote which prevents a lot of bugs in
macros, I'm sure one day reader macros may appear for users to play with.
Certainly something scoped by namespaces (if possible ?) so that they don't
invest source code that don't even know of their existence !

-- 
Laurent

2009/8/14 Daniel Lyons <fus...@storytotell.org>

>
>
> On Aug 14, 2009, at 12:12 AM, Chouser wrote:
> > That particular example may not have to be a macro at all:
> >
> > http://paste.lisp.org/display/75230
>
> Wonderful! :)
>
> > I think people want reader macros for a couple different reasons.
> > Sometimes it's just to remove parens from a function or macro call."
> >
> > (sorry, finger slipped on the send button)
> >
> > Another rather different reason is to implement features that would
> > otherwise require manually escaped strings as was mentioned earlier.
>
> Speaking personally, the only reader macro I can think of I would
> actually use would be the units one. What makes that interesting is
> that you have to modify what the reader does with a token that almost
> already parses. I wouldn't be upset if I had to wrap an expression in
> some syntax but the downside to string quoting is mainly the editor.
> People don't seem to like putting raw SQL in their code either (I
> don't agree but whatever).
>
> > Perhaps these different desires can fulfilled with two different
> > constructs.
>
>
> The two being:
>
> 1. To remove parens from a function or macro call. You mean e.g. #"
> and #()?
> 2. To achieve DSLs that would screw up the reader, such as the units
> one? Or is there a better example?
>
> I halfway like the named readtable idea proposed by Richard Newman,
> but I have to admit I still feel uneasy for some reason.
>
> —
> Daniel Lyons
>
>
> >
>

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