[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

backquote query



I have a question which to those in the know will probably seem  rather
dense, but for  which I  cannot see the  answer.  Why,  in MACLISP  and
friends, is  the backquote/unquote  mechanism implemented  strictly  in
terms of read macros?  That  is, why is the  search for commas and  the
like done at read time, instead  of the reader simply wrapping a  macro
around the form,  and having  the search for  commas and  such done  at
macro expansion  time?   Is this  simply  an efficiency  hack  for  the
interpreter?

Several times  in  writing macro  producing  macros I  have  wanted  to
dynamically create  forms containing  backquotes and  unquotes, and  (I
think -- maybe I'm missing something)  have been unable to do so  since
they are always expanded at read time.
-------